From b3a7a5731285625aa9fc6a347841591757860edb Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 1 Sep 2026 01:55:44 +0200 Subject: Fix const extern variable declarations --- testsuite/fail_compilation/assign_const_element.elna | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 testsuite/fail_compilation/assign_const_element.elna (limited to 'testsuite/fail_compilation') diff --git a/testsuite/fail_compilation/assign_const_element.elna b/testsuite/fail_compilation/assign_const_element.elna new file mode 100644 index 0000000..9b9c341 --- /dev/null +++ b/testsuite/fail_compilation/assign_const_element.elna @@ -0,0 +1,11 @@ +type + CI = const Int + +proc f() +var + a: [3]CI := [1, 2, 3] +begin + a[1] := 6 (* @Error Cannot assign to a value of type 'CI', because it is constant or contains constant members *) +return + +end. -- cgit v1.2.3