mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
* add testcase for #6036
* try
* try again
* make it work
(cherry picked from commit 4374c638cd)
This commit is contained in:
11
tests/ccgbugs/tcompile_time_var_at_runtime.nim
Normal file
11
tests/ccgbugs/tcompile_time_var_at_runtime.nim
Normal file
@@ -0,0 +1,11 @@
|
||||
discard """
|
||||
output: "1\n2\n2\n3"
|
||||
"""
|
||||
var a {.compileTime.} = 1
|
||||
|
||||
echo a
|
||||
a = 2
|
||||
echo a
|
||||
echo a
|
||||
a = 3
|
||||
echo a
|
||||
Reference in New Issue
Block a user