Fixed template const tuple unpacking (#18562)
This commit is contained in:
parent
0c4582c665
commit
5386ae75ba
2 changed files with 28 additions and 22 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue