You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import std/macros
templatep {.pragma.}
funcfoo[T0](v: T0): bool=type T =T0
T.hasCustomPragma(p)
type X {.p.} =objectecho$foo(X())
Nim Version
% nim -v
Nim Compiler Version 2.0.5 [MacOSX: amd64]
Compiled at 2024-05-03
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: fcb8461efab2ef7bdd976f82af8c7d1390f502ac
active boot switches: -d:release
% nim -v
Nim Compiler Version 1.6.20 [MacOSX: amd64]
Compiled at 2024-04-29
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 19fdbfc173bfccb64cb64e0a963e69f52f71fc73
active boot switches: -d:release
Current Output
false
Expected Output
true
Possible Solution
On T0, hasCustomPragma works fine. It's only broken on type T = T0.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
Nim Version
Current Output
Expected Output
Possible Solution
On
T0
,hasCustomPragma
works fine. It's only broken ontype T = T0
.Additional Information
No response
The text was updated successfully, but these errors were encountered: