1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-01 12:41:30 +00:00

Add one more test case, to demonstrate that it's not just output.

This commit is contained in:
Chris Pressey 2018-12-11 22:42:59 +00:00
parent 547b7c960a
commit 538365f1e1

View File

@ -1607,7 +1607,7 @@ Both blocks of an `if` are analyzed.
| }
= ok
If a location is initialized in one block, is must be initialized in the other as well
If a location is initialized in one block, it must be initialized in the other as well
in order to be considered to be initialized after the block. If it is not consistent,
it will be considered uninitialized.
@ -1653,6 +1653,20 @@ it will be considered uninitialized.
| }
? UnmeaningfulOutputError: x
| define foo routine
| inputs a
| trashes a, x, z, n, c
| {
| cmp a, 42
| if not z {
| ld a, 6
| } else {
| ld x, 7
| }
| ld a, x
| }
? UnmeaningfulReadError: x
If we don't care if it's uninitialized after the `if`, that's okay then.
| define foo routine