diff options
Diffstat (limited to 'testsuite/fail_compilation/compare_unrelated_records.elna')
| -rw-r--r-- | testsuite/fail_compilation/compare_unrelated_records.elna | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/compare_unrelated_records.elna b/testsuite/fail_compilation/compare_unrelated_records.elna new file mode 100644 index 0000000..71eaeda --- /dev/null +++ b/testsuite/fail_compilation/compare_unrelated_records.elna @@ -0,0 +1,17 @@ +type + A = record + x: Int + end + B = record + y: Int; + z: Int + end + +var + a: A + b: B + ok: Bool + +begin + ok := b = a (* @Error Invalid operands of type 'B' and 'A' for operator = *) +end. |
