mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
retain forced open undeclared ident information (#22019)
This commit is contained in:
17
tests/lookups/tundeclaredmixin.nim
Normal file
17
tests/lookups/tundeclaredmixin.nim
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user