diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-08-02 00:45:05 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-08-02 00:45:05 +0200 |
| commit | c07c43bf911f62ad6363c024b3f81ceb4f95b16c (patch) | |
| tree | d536b942ecede49741c090e61337947a26fbe030 /testsuite | |
| parent | e9cd3e5d0157f145dc0c3fea59f434fdd5ae55c6 (diff) | |
| download | elna-c07c43bf911f62ad6363c024b3f81ceb4f95b16c.tar.gz | |
Report field access errors
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/fail_compilation/access_record_type_field.elna | 9 | ||||
| -rw-r--r-- | testsuite/fail_compilation/enumeration_member_missing.elna | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/access_record_type_field.elna b/testsuite/fail_compilation/access_record_type_field.elna new file mode 100644 index 0000000..4e8bc6a --- /dev/null +++ b/testsuite/fail_compilation/access_record_type_field.elna @@ -0,0 +1,9 @@ +type + R = record + field1, field2: Int + end + +proc f(): Int +return R.field1 (* @Error Cannot access field 'field1' on type 'R' *) + +end. diff --git a/testsuite/fail_compilation/enumeration_member_missing.elna b/testsuite/fail_compilation/enumeration_member_missing.elna new file mode 100644 index 0000000..84a13d1 --- /dev/null +++ b/testsuite/fail_compilation/enumeration_member_missing.elna @@ -0,0 +1,7 @@ +type + Enumeration = (one, two, three) + +proc f(): Enumeration +return Enumeration.four (* @Error Enumeration 'Enumeration' does not have a member named 'four' *) + +end. |
