From d905e48d6af0445c7941cd2e638461db2f4d9ee8 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 31 Aug 2026 00:49:46 +0200 Subject: Type check for value addressability --- .../fail_compilation/assign_to_call_result_field.elna | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 testsuite/fail_compilation/assign_to_call_result_field.elna (limited to 'testsuite/fail_compilation/assign_to_call_result_field.elna') diff --git a/testsuite/fail_compilation/assign_to_call_result_field.elna b/testsuite/fail_compilation/assign_to_call_result_field.elna new file mode 100644 index 0000000..509b2dd --- /dev/null +++ b/testsuite/fail_compilation/assign_to_call_result_field.elna @@ -0,0 +1,15 @@ +type + R = record + x: Int + end + +proc make() -> R +var + result: R +begin + result.x := 1 +return result + +begin + make().x := 5 (* @Error Expression of type 'Int' is not addressable *) +end. -- cgit v1.2.3