Unpack mSlice tupleconstr for static openarrays (#20615)

This commit is contained in:
Jason Beetham 2022-10-21 22:37:23 -06:00 • committed by GitHub
commit da0a2fdca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 0 deletions

View file

@ -35,6 +35,10 @@ static:
assert arr.toOpenArray(3, 4).toOpenArray(0, 0) == [1]
proc doThing(s: static openArray[int]) = discard
doThing([10, 20, 30].toOpenArray(0, 0))
# bug #19969
proc f(): array[1, byte] =
var a: array[1, byte]