summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-08-21 02:34:34 +0200
committerAraq <rumpf_a@web.de>2015-08-21 02:34:34 +0200
commit695e2e970e5ee560d324d6775c202f9b808f97fa (patch)
treeee9a89024a46a4eaf425c1000b5c0406c5c99633 /tests
parenta2bb7d4c71e0804dd57c8e4d7ba16cf61ab184f1 (diff)
downloadNim-695e2e970e5ee560d324d6775c202f9b808f97fa.tar.gz
implemented macros.getImpl
Diffstat (limited to 'tests')
-rw-r--r--tests/macros/tgetimpl.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/macros/tgetimpl.nim b/tests/macros/tgetimpl.nim
new file mode 100644
index 000000000..d38492934
--- /dev/null
+++ b/tests/macros/tgetimpl.nim
@@ -0,0 +1,20 @@
+discard """
+  msg: '''"muhaha"
+proc poo(x, y: int) =
+  echo ["poo"]'''
+"""
+
+import macros
+
+const
+  foo = "muhaha"
+
+proc poo(x, y: int) =
+  echo "poo"
+
+macro m(x: typed): untyped =
+  echo repr x.symbol.getImpl
+  result = x
+
+discard m foo
+discard m poo