git @ Cat's Eye Technologies SixtyPical / 5f62de1
Add failing test for multiple gotos that are all in tail position. Chris Pressey 4 years ago
1 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22302230 | }
22312231 ? IllegalJumpError
22322232
2233 | routine bar trashes x, z, n {
2234 | ld x, 200
2235 | }
2236 |
2237 | routine main trashes x, z, n {
2238 | ld x, 0
2239 | if z {
2240 | ld x, 1
2241 | goto bar
2242 | } else {
2243 | ld x, 0
2244 | goto bar
2245 | }
2246 | }
2247 = ok
2248
22332249 Can't `goto` a routine that outputs or trashes more than the current routine.
22342250
22352251 | routine bar trashes x, y, z, n {