diff options
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/fail_compilation/record_constructor_const.elna | 10 | ||||
| -rw-r--r-- | testsuite/runnable/inferred_variable.elna | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/fail_compilation/record_constructor_const.elna b/testsuite/fail_compilation/record_constructor_const.elna new file mode 100644 index 0000000..946105b --- /dev/null +++ b/testsuite/fail_compilation/record_constructor_const.elna @@ -0,0 +1,10 @@ +module +type + R = record + x: Int + end + +var + r := { const R; x: 1 } (* @Error Record constructor cannot have 'const' qualifier *) + +end. diff --git a/testsuite/runnable/inferred_variable.elna b/testsuite/runnable/inferred_variable.elna index e0822b8..48d7414 100644 --- a/testsuite/runnable/inferred_variable.elna +++ b/testsuite/runnable/inferred_variable.elna @@ -2,8 +2,12 @@ program() var x := 42 c: const := 10 + y := c + arr := [c, 2] begin x := x + 1; - assert(x = 43 & c = 10) + y := y + 5; + arr[1] := 99; + assert(x = 43 & c = 10 & y = 15 & arr[1] = 99 & arr[2] = 2) end. |
