From a0e1740227535adc3151c02eb102c4f96b4f9731 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 17 Jul 2026 10:18:58 +0200 Subject: Implement type constness --- testsuite/fail_compilation/assign_member_of_const.elna | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 testsuite/fail_compilation/assign_member_of_const.elna (limited to 'testsuite/fail_compilation/assign_member_of_const.elna') diff --git a/testsuite/fail_compilation/assign_member_of_const.elna b/testsuite/fail_compilation/assign_member_of_const.elna new file mode 100644 index 0000000..fc945bb --- /dev/null +++ b/testsuite/fail_compilation/assign_member_of_const.elna @@ -0,0 +1,13 @@ +type + R = record + x: Int + end + +proc f() +var + r: const R := R{ x: 5 } +begin + r.x := 6 (* @Error Cannot assign to a value of type 'const Int', because it is constant or contains constant members *) +return + +end. -- cgit v1.2.3