diff options
author | Araq <rumpf_a@web.de> | 2015-07-03 10:55:50 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-07-03 10:55:50 +0200 |
commit | 60ac5e3e76fe24e015782a081da3f04f0000ea5f (patch) | |
tree | 7768d0b553b647874cc177ecb3847eb21f96e513 /tests/macros | |
parent | 2d196442fa6db010307a2dc62c65f1129ce9705d (diff) | |
download | Nim-60ac5e3e76fe24e015782a081da3f04f0000ea5f.tar.gz |
fixes #3046
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tbugs.nim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/macros/tbugs.nim b/tests/macros/tbugs.nim index 1ecb0d4cc..1bfce6bc4 100644 --- a/tests/macros/tbugs.nim +++ b/tests/macros/tbugs.nim @@ -9,7 +9,10 @@ TTaa TTaa true true -nil''' +nil +42 +false +true''' output: '''test 2''' @@ -88,3 +91,16 @@ proc calc(): array[1, int] = const c = calc() echo c[0] + + +# bug #3046 + +macro sampleMacroInt(i: int): stmt = + echo i.intVal + +macro sampleMacroBool(b: bool): stmt = + echo b.boolVal + +sampleMacroInt(42) +sampleMacroBool(false) +sampleMacroBool(system.true) |