aboutsummaryrefslogtreecommitdiffstats
path: root/progs/tests/tuples_fail_out_of_bounds.sy
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-08 00:18:31 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-08 00:18:31 +0100
commit6b2ff65735bb8229af9994db8221303b73a8194b (patch)
treef846401191c7bb87851cb8c2fb0077665ba03e24 /progs/tests/tuples_fail_out_of_bounds.sy
parentbd2371faefb2d2cd52477dbd2628013ed8feb103 (diff)
downloadsylt-6b2ff65735bb8229af9994db8221303b73a8194b.tar.gz
add tests
Diffstat (limited to 'progs/tests/tuples_fail_out_of_bounds.sy')
-rw-r--r--progs/tests/tuples_fail_out_of_bounds.sy6
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/tests/tuples_fail_out_of_bounds.sy b/progs/tests/tuples_fail_out_of_bounds.sy
new file mode 100644
index 0000000..cb0764a
--- /dev/null
+++ b/progs/tests/tuples_fail_out_of_bounds.sy
@@ -0,0 +1,6 @@
+start :: fn {
+ a := (1, 2)
+ a[2]
+}
+
+// errors: [ErrorKind::IndexOutOfBounds(_, 2, 2)]