Fixed template const tuple unpacking (#18562)

This commit is contained in:
Jason Beetham 2021-07-23 00:46:13 -06:00 • committed by GitHub
commit 5386ae75ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 22 deletions

View file

@ -34,5 +34,15 @@ template main() =
doAssert ct in b, $(b, ct)
doAssert NimVersion in b
block: # Test for fix on broken const unpacking
template mytemp() =
const
(x, increment) = (4, true)
a = 100
discard (x, increment, a)
mytemp()
static: main()
main()