diff options
author | Araq <rumpf_a@web.de> | 2012-03-13 02:01:56 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-03-13 02:01:56 +0100 |
commit | c25ffbf2622a197c15a4a3bd790b1bc788db2c7f (patch) | |
tree | d1a23e97a11a92bc83286fd77ba4e4a953d753fa /tests | |
parent | 1d8ff40f5679d3ddfa10a89b0333a0132ee1e1b2 (diff) | |
download | Nim-c25ffbf2622a197c15a4a3bd790b1bc788db2c7f.tar.gz |
first steps for cleaner static/const distinction
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/tidgen.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/run/tidgen.nim b/tests/run/tidgen.nim index 68fffbabb..0e856dc19 100644 --- a/tests/run/tidgen.nim +++ b/tests/run/tidgen.nim @@ -6,14 +6,14 @@ import macros # Test compile-time state in same module -var gid = 3 +var gid {.compileTime.} = 3 macro genId(invokation: expr): expr = result = newIntLitNode(gid) inc gid -proc Id1(): int = return genId() -proc Id2(): int = return genId() +proc Id1(): int {.compileTime.} = return genId() +proc Id2(): int {.compileTime.} = return genId() echo Id1(), " ", Id2() |