aboutsummaryrefslogtreecommitdiff
path: root/testsuite/fail_compilation/reference_slicing.elna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/fail_compilation/reference_slicing.elna')
-rw-r--r--testsuite/fail_compilation/reference_slicing.elna7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/fail_compilation/reference_slicing.elna b/testsuite/fail_compilation/reference_slicing.elna
new file mode 100644
index 0000000..fac8ec6
--- /dev/null
+++ b/testsuite/fail_compilation/reference_slicing.elna
@@ -0,0 +1,7 @@
+var
+ s: [3]Int
+ p: ^Int
+
+begin
+ p := @s[1 to 2] (* @Error Expression of type '\[\]Int' is not addressable *)
+end.