diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-09-01 17:44:38 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-09-01 17:44:38 +0200 |
| commit | 6eaec8726f716b2ab6b48c8cd3d7fee6aaf86977 (patch) | |
| tree | 3acd00ea423f9120d4d79e2646c042dd9f596122 /testsuite/fail_compilation/opaque_pointer_arithmetic.elna | |
| parent | b3a7a5731285625aa9fc6a347841591757860edb (diff) | |
| download | elna-6eaec8726f716b2ab6b48c8cd3d7fee6aaf86977.tar.gz | |
Reject pointer arithmetic on opaque pointers
Diffstat (limited to 'testsuite/fail_compilation/opaque_pointer_arithmetic.elna')
| -rw-r--r-- | testsuite/fail_compilation/opaque_pointer_arithmetic.elna | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/opaque_pointer_arithmetic.elna b/testsuite/fail_compilation/opaque_pointer_arithmetic.elna new file mode 100644 index 0000000..307aed8 --- /dev/null +++ b/testsuite/fail_compilation/opaque_pointer_arithmetic.elna @@ -0,0 +1,9 @@ +type + Handle = extern + +var + p: ^Handle + +begin + p := p + 1 (* @Error Opaque type 'Handle' cannot be used as an element type in pointer arithmetic *) +end. |
