summary refs log tree commit diff stats
path: root/tests/openarray
diff options
context:
space:
mode:
Diffstat (limited to 'tests/openarray')
-rw-r--r--tests/openarray/t8259.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/openarray/t8259.nim b/tests/openarray/t8259.nim
new file mode 100644
index 000000000..40ff2b2f1
--- /dev/null
+++ b/tests/openarray/t8259.nim
@@ -0,0 +1,7 @@
+discard """
+  line: 6
+  errormsg: "invalid type: 'openarray[int]' for result"
+"""
+
+proc foo(a: openArray[int]):auto = a
+echo foo(toOpenArray([1, 2], 0, 2))