diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-08-31 00:49:46 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-08-31 00:49:46 +0200 |
| commit | d905e48d6af0445c7941cd2e638461db2f4d9ee8 (patch) | |
| tree | 7af05b7c798864d745fc3bd831e7227c0a51b567 /testsuite/fail_compilation/assign_to_call_result_field.elna | |
| parent | 26a1b9ad9f347315bc14f2bf3ee064ede51794fc (diff) | |
| download | elna-d905e48d6af0445c7941cd2e638461db2f4d9ee8.tar.gz | |
Type check for value addressability
Diffstat (limited to 'testsuite/fail_compilation/assign_to_call_result_field.elna')
| -rw-r--r-- | testsuite/fail_compilation/assign_to_call_result_field.elna | 15 |
1 files changed, 15 insertions, 0 deletions
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. |
