diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-08 01:29:37 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-08 01:29:37 +0200 |
| commit | d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c (patch) | |
| tree | c4d2f2ea44bbcb26108e86270a4454cd04f7873a /testsuite/fail_compilation | |
| parent | 12e304fd56f054ba7296ab538eecd4280a67832a (diff) | |
| download | elna-d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c.tar.gz | |
Move record constructor type into the braces
Diffstat (limited to 'testsuite/fail_compilation')
3 files changed, 4 insertions, 4 deletions
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. |
