summary refs log tree commit diff stats
path: root/tests/lookups/mmacroamb.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lookups/mmacroamb.nim')
-rw-r--r--tests/lookups/mmacroamb.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lookups/mmacroamb.nim b/tests/lookups/mmacroamb.nim
new file mode 100644
index 000000000..107e51055
--- /dev/null
+++ b/tests/lookups/mmacroamb.nim
@@ -0,0 +1,10 @@
+# issue #12732
+
+import std/macros
+const getPrivate3_tmp* = 0
+const foobar1* = 0 # comment this or make private and it'll compile fine
+macro foobar4*(): untyped =
+  newLit "abc"
+template currentPkgDir2*: string = foobar4()
+macro currentPkgDir2*(dir: string): untyped =
+  newLit "abc2"