We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type User {.exportc, packed.} = object id: int import macros macro test(t: typedesc): untyped = echo t.getType()[1].symbol.getImpl.treerepr test(User)
the output doesn't contain any informations of the pragma:
TypeDef Sym "User" Empty ObjectTy Empty Empty RecList IdentDefs Ident ident"id" Sym "int" Empty
Also the procs hasCustomPragma and getCustomPragmaVal don't support types. But the documentation contains an example of a custom pragma on a object(https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-custom-annotations)
hasCustomPragma
getCustomPragmaVal
Also see here https://forum.nim-lang.org/t/3705
The text was updated successfully, but these errors were encountered:
I found another problem: Because of the implicit dereference hasCustomPragma and getCustomPragma don't work with ref types (https://github.com/nim-lang/Nim/blob/master/lib/core/macros.nim#L1224 where n[0] should be n[0][0] in case it's of the kind nnkHiddenDeref)
getCustomPragma
ref
n[0]
n[0][0]
nnkHiddenDeref
Sorry, something went wrong.
fixes #7451 (#7575)
3d1d163
No branches or pull requests
the output doesn't contain any informations of the pragma:
Also the procs
hasCustomPragma
andgetCustomPragmaVal
don't support types. But the documentation contains an example of a custom pragma on a object(https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-custom-annotations)Also see here https://forum.nim-lang.org/t/3705
The text was updated successfully, but these errors were encountered: