diff options
Diffstat (limited to 'testsuite/fail_compilation/reference_call_result_field.elna')
| -rw-r--r-- | testsuite/fail_compilation/reference_call_result_field.elna | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/reference_call_result_field.elna b/testsuite/fail_compilation/reference_call_result_field.elna new file mode 100644 index 0000000..5051cc8 --- /dev/null +++ b/testsuite/fail_compilation/reference_call_result_field.elna @@ -0,0 +1,18 @@ +type + R = record + x: Int + end + +var + p: ^Int + +proc make() -> R +var + result: R +begin + result.x := 1 +return result + +begin + p := @make().x (* @Error Expression of type 'Int' is not addressable *) +end. |
