Merge pull request #8990 from LemonBoy/fix-8259

Always check the deduced type validity for result
This commit is contained in:
Andreas Rumpf 2018-09-17 22:45:12 +02:00 • committed by GitHub
commit 9c6dde1b70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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))