fixes #20958; fixes the return type of slice function [backport] (#20959)

* fixes #20958; fixes the return type of slice function

* add a testcase
This commit is contained in:
ringabout 2022-11-29 14:21:44 +08:00 • committed by GitHub
commit 3d5edb41be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -61,3 +61,15 @@ maino() # Doesn't work outside a proc
when true:
main()
block two:
proc f(a: openArray[int]) =
discard
proc main() =
var a: array[0..9, int] = [0,1,2,3,4,5,6,7,8,9]
parallel:
spawn f(a[0..2])
main()