summary refs log tree commit diff stats
path: root/tests/ccgbugs/tcompile_time_var_at_runtime.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ccgbugs/tcompile_time_var_at_runtime.nim')
-rw-r--r--tests/ccgbugs/tcompile_time_var_at_runtime.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ccgbugs/tcompile_time_var_at_runtime.nim b/tests/ccgbugs/tcompile_time_var_at_runtime.nim
new file mode 100644
index 000000000..c0de0390b
--- /dev/null
+++ b/tests/ccgbugs/tcompile_time_var_at_runtime.nim
@@ -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 
\ No newline at end of file