Files
Nim/tests/pragmas/tgenericparamcustompragma.nim
metagn 7701b3c7e6 don't set sym of generic param type value to generic param sym (#24995)
fixes #23713

`linkTo` normally sets the sym of the type as well as the type of the
sym, but this is not wanted for custom pragmas as it would look up the
definition of the generic param and not the definition of its value. I
don't see a practical use for this either.
2025-06-13 00:03:02 +02:00

14 lines
144 B
Nim

# issue #23713
import std/macros
template p {.pragma.}
type
X {.p.} = object
Y[T] = object
t: T
doAssert Y[X].T.hasCustomPragma(p)