From 1e0f89df48ba10cdde80bd623b84e20fb48b977d Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 24 Jul 2026 21:28:33 +0200 Subject: Accept any constant types in case labels --- testsuite/fail_compilation/case_non_constant.elna | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 testsuite/fail_compilation/case_non_constant.elna (limited to 'testsuite/fail_compilation/case_non_constant.elna') diff --git a/testsuite/fail_compilation/case_non_constant.elna b/testsuite/fail_compilation/case_non_constant.elna new file mode 100644 index 0000000..2f19df8 --- /dev/null +++ b/testsuite/fail_compilation/case_non_constant.elna @@ -0,0 +1,16 @@ +type + R = record + a: Int; + b: Int + end + +var + r: R + x: R + +begin + x := r; + case x of + r: (* @Error Expected a constant expression *) + end +end. -- cgit v1.2.3