Update the errorful rudiments.

This commit is contained in:
Chris Pressey 2019-10-22 16:56:19 +01:00
parent 4b518508d5
commit fbfab44887
3 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,8 @@
// should fail analysis with an UnmeaningfulReadError
// because adding 4 to the accumulator reads the carry
// but the carry has neither been provided as input
// nor set to anything in particular by this routine.
define add_four routine
inputs a
outputs a

View File

@ -1,3 +1,7 @@
// should fail analysis with a RangeExceededError
// because the index is detected to fall outside the
// allowable range of the table it is indexing.
byte table[8] message : "WHAT?"
define main routine

View File

@ -1,9 +1,14 @@
vector vec
// should fail analysis with a ConstantConstraintError
// because it cannot copy the address of `foo` into `vec`
// because it has incompatible constraints.
vector routine
inputs y
outputs y
trashes z, n
vec
routine foo
define foo routine
inputs x
outputs x
trashes z, n
@ -11,7 +16,7 @@ routine foo
inc x
}
routine main
define main routine
inputs foo
outputs vec
trashes a, z, n