diff options
Diffstat (limited to 'tests/vm/tcompiletimetable.nim')
-rw-r--r-- | tests/vm/tcompiletimetable.nim | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/vm/tcompiletimetable.nim b/tests/vm/tcompiletimetable.nim index e78c06536..1db490f1a 100644 --- a/tests/vm/tcompiletimetable.nim +++ b/tests/vm/tcompiletimetable.nim @@ -1,9 +1,16 @@ discard """ - nimout: '''2 + nimout: ''' +2 3 4:2 Got Hi -Got Hey''' +Got Hey +''' + output:''' +a +b +c +''' """ # bug #404 @@ -47,3 +54,9 @@ addStuff("Hey"): echo "Hey" addStuff("Hi"): echo "Hi" dump() +# ensure .compileTime vars can be used at runtime: +import macros + +var xzzzz {.compileTime.}: array[3, string] = ["a", "b", "c"] + +for i in 0..high(xzzzz): echo xzzzz[i] |