diff options
author | metagn <metagngn@gmail.com> | 2023-06-07 12:36:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 11:36:51 +0200 |
commit | ce72b564bce334b2d8a3b3dbea800557bd842e64 (patch) | |
tree | 4d2cf264bf6cf666c2e206fe271ef08ae9a2ef31 /tests/lookups | |
parent | fcc383d89994241f1b73fe4f85ef38528c135e2e (diff) | |
download | Nim-ce72b564bce334b2d8a3b3dbea800557bd842e64.tar.gz |
retain forced open undeclared ident information (#22019)
Diffstat (limited to 'tests/lookups')
-rw-r--r-- | tests/lookups/tundeclaredmixin.nim | 17 |
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 |