diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-09-17 15:33:44 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-09-17 15:33:44 +0200 |
commit | 3588240226187152f618febb8c01a034084ce772 (patch) | |
tree | cec26305abcfa4517f4ef04f4c1c8e1e0f5ce0bf /tests/openarray | |
parent | 6dc6ea41468dc99c8826b03b512af8f9a46e660d (diff) | |
download | Nim-3588240226187152f618febb8c01a034084ce772.tar.gz |
Always check the deduced type validity for result
Fixes #8259
Diffstat (limited to 'tests/openarray')
-rw-r--r-- | tests/openarray/t8259.nim | 7 |
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)) |