From d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 8 Oct 2026 01:29:37 +0200 Subject: Move record constructor type into the braces --- testsuite/fail_compilation/assign_const_member.elna | 4 ++-- testsuite/fail_compilation/assign_member_of_const.elna | 2 +- testsuite/fail_compilation/record_base_constructor_type_mismatch.elna | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'testsuite/fail_compilation') diff --git a/testsuite/fail_compilation/assign_const_member.elna b/testsuite/fail_compilation/assign_const_member.elna index a603729..13e9e40 100644 --- a/testsuite/fail_compilation/assign_const_member.elna +++ b/testsuite/fail_compilation/assign_const_member.elna @@ -7,8 +7,8 @@ type proc f() var - r1: R := R{ x: 5 } - r2: R := R{ x: 5 } + r1: R := { R; x: 5 } + r2: R := { R; x: 5 } begin r1 := r2 (* @Error Cannot assign to a value of type 'R', because it is constant or contains constant members *) return diff --git a/testsuite/fail_compilation/assign_member_of_const.elna b/testsuite/fail_compilation/assign_member_of_const.elna index efdf67b..44fb566 100644 --- a/testsuite/fail_compilation/assign_member_of_const.elna +++ b/testsuite/fail_compilation/assign_member_of_const.elna @@ -7,7 +7,7 @@ type proc f() var - r: const R := R{ x: 5 } + 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 diff --git a/testsuite/fail_compilation/record_base_constructor_type_mismatch.elna b/testsuite/fail_compilation/record_base_constructor_type_mismatch.elna index d7a8419..27a652c 100644 --- a/testsuite/fail_compilation/record_base_constructor_type_mismatch.elna +++ b/testsuite/fail_compilation/record_base_constructor_type_mismatch.elna @@ -11,5 +11,5 @@ var c: Child begin - c := Child{a: "wrong", b: 9} (* @Error Expected type 'Int', but got '\[\]const Word8' *) + c := { Child; a: "wrong", b: 9 } (* @Error Expected type 'Int', but got '\[\]const Word8' *) end. -- cgit v1.2.3