summary refs log tree commit diff stats
path: root/tests/vm/tgloballetfrommacro.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-08-31 19:32:59 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-08-31 19:32:59 +0200
commit6e01be34efd60869c7905b1effcc47880cedfb6d (patch)
tree02fe3dd7f7d43215ffea7e0aef138db5852ae8e2 /tests/vm/tgloballetfrommacro.nim
parent326a333c8b85d4cb0a8332e8ce292bf7bf296104 (diff)
downloadNim-6e01be34efd60869c7905b1effcc47880cedfb6d.tar.gz
fixes #11903 (#11908)
Diffstat (limited to 'tests/vm/tgloballetfrommacro.nim')
-rw-r--r--tests/vm/tgloballetfrommacro.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/vm/tgloballetfrommacro.nim b/tests/vm/tgloballetfrommacro.nim
new file mode 100644
index 000000000..14dbff1e8
--- /dev/null
+++ b/tests/vm/tgloballetfrommacro.nim
@@ -0,0 +1,13 @@
+discard """
+errormsg: "cannot evaluate at compile time: BUILTIN_NAMES"
+line: 11
+"""
+
+import sets
+
+let BUILTIN_NAMES = toSet(["int8", "int16", "int32", "int64"])
+
+macro test*(): bool =
+  echo "int64" notin BUILTIN_NAMES
+
+echo test()