tock-mirror/testcases/constants.occ

28 lines
660 B
Plaintext

PROC P ()
INT X:
SEQ
X := 42
-- These should be pulled out of the proc...
VAL INT a IS 42:
VAL INT b IS a + 1:
VAL INT c IS a + b:
VAL []INT d IS [1, 2, 3, 4]:
VAL INT e IS d[2]:
VAL INT32 f RETYPES a:
VAL INT g IS BYTESIN (a):
VAL BOOL aft IS a AFTER b:
-- ... and these shouldn't.
[c]INT array.of.const.size:
INT A:
VAL INT B IS A + 1:
VAL INT C IS X + B:
VAL []INT D IS [1, 2, X, 4]:
VAL INT E IS D[2]: -- technically the others should be OK, but I think that's excessive analysis!
VAL INT32 F RETYPES A:
VAL INT G IS BYTESIN (E):
VAL BOOL AFT IS A AFTER B:
SKIP
: