Fix compileTime pragma applying to whole var/let section (#10389)

This commit is contained in:
Neelesh Chandola 2019-01-22 12:25:11 +05:30 • committed by Andreas Rumpf
commit 226c15499f
2 changed files with 19 additions and 6 deletions

15
tests/vm/tvarsection.nim Normal file
View file

@ -0,0 +1,15 @@
discard """
output: '''-1abc'''
"""
var
a {.compileTime.} = 2
b = -1
c {.compileTime.} = 3
d = "abc"
static:
assert a == 2
assert c == 3
echo b, d