diff options
author | Neelesh Chandola <neelesh.chandola@outlook.com> | 2019-01-22 12:25:11 +0530 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-22 07:55:11 +0100 |
commit | 226c15499fe829d533b4811aa5c68b15de870b04 (patch) | |
tree | b6f7b1eb4012a97feea6c4243931b147673e9218 /tests | |
parent | 44c04b35717336595dad03ac532ee9e141a0e374 (diff) | |
download | Nim-226c15499fe829d533b4811aa5c68b15de870b04.tar.gz |
Fix compileTime pragma applying to whole var/let section (#10389)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vm/tvarsection.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/vm/tvarsection.nim b/tests/vm/tvarsection.nim new file mode 100644 index 000000000..d1c4926a0 --- /dev/null +++ b/tests/vm/tvarsection.nim @@ -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 |