summary refs log tree commit diff stats
path: root/tests/lookups
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-06-07 12:36:51 +0300
committerGitHub <noreply@github.com>2023-06-07 11:36:51 +0200
commitce72b564bce334b2d8a3b3dbea800557bd842e64 (patch)
tree4d2cf264bf6cf666c2e206fe271ef08ae9a2ef31 /tests/lookups
parentfcc383d89994241f1b73fe4f85ef38528c135e2e (diff)
downloadNim-ce72b564bce334b2d8a3b3dbea800557bd842e64.tar.gz
retain forced open undeclared ident information (#22019)
Diffstat (limited to 'tests/lookups')
-rw-r--r--tests/lookups/tundeclaredmixin.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lookups/tundeclaredmixin.nim b/tests/lookups/tundeclaredmixin.nim
new file mode 100644
index 000000000..74d16cdde
--- /dev/null
+++ b/tests/lookups/tundeclaredmixin.nim
@@ -0,0 +1,17 @@
+discard """
+  nimout: '''
+  mixin nothing, add
+'''
+"""
+
+# issue #22012
+
+import macros
+
+expandMacros:
+  proc foo[T](): int =
+    # `nothing` is undeclared, `add` is declared
+    mixin nothing, add
+    123
+
+  doAssert foo[int]() == 123