1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-26 14:49:15 +00:00

Add failing test for multiple gotos that are all in tail position.

This commit is contained in:
Chris Pressey 2018-03-13 13:33:30 +00:00
parent b1e9df0d45
commit 5f62de11c2

View File

@ -2231,6 +2231,22 @@ Calling the vector does indeed trash the things the vector says it does.
| } | }
? IllegalJumpError ? IllegalJumpError
| routine bar trashes x, z, n {
| ld x, 200
| }
|
| routine main trashes x, z, n {
| ld x, 0
| if z {
| ld x, 1
| goto bar
| } else {
| ld x, 0
| goto bar
| }
| }
= ok
Can't `goto` a routine that outputs or trashes more than the current routine. Can't `goto` a routine that outputs or trashes more than the current routine.
| routine bar trashes x, y, z, n { | routine bar trashes x, y, z, n {