mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
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.
14 lines
144 B
Nim
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)
|