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
pragmas of attributes are not recognized in macros.
Example
import macros
templatemyAttr {. pragma .}
typeTObj=object
a {. myAttr .}: intmacrohasMyAttr*(t: typedesc): untyped=let objTy = t.getType[1].getType
let recList = objTy[2]
let sym = recList[0]
assert sym.kind == nnkSym and sym.strVal =="a"let hasAttr = sym.hasCustomPragma(myAttr)
newLit(hasAttr)
echohasMyAttr(TObj)
Current Output
false
Expected Output
true
Additional Information
$ nim -v
Nim Compiler Version 0.20.0 [Linux: amd64]
Compiled at 2019-06-06
Copyright (c) 2006-2019 by Andreas Rumpf
git hash: e7471cebae2a404f3e4239f199f5a0c422484aac
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
pragmas of attributes are not recognized in macros.
Example
Current Output
Expected Output
Additional Information
The text was updated successfully, but these errors were encountered: