aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/assign_element_of_const.elna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/fail_compilation/assign_element_of_const.elna')
-rw-r--r--testsuite/fail_compilation/assign_element_of_const.elna8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/assign_element_of_const.elna b/testsuite/fail_compilation/assign_element_of_const.elna
new file mode 100644
index 0000000..9afd520
--- /dev/null
+++ b/testsuite/fail_compilation/assign_element_of_const.elna
@@ -0,0 +1,8 @@
+proc f()
+var
+ a: const [2]Int
+begin
+ a[1] := 6 (* @Error Cannot assign to a value of type 'const Int', because it is constant or contains constant members *)
+return
+
+end.