hasCustomPragma/getCustomPragmaVal: small fix (#7650)
* fix hasCustomPragma/getCustomPragmaVal for types without pragma * fix pragma on pointer test * removed trailing spaces
This commit is contained in:
parent
0dc4d6dcc2
commit
3402926372
2 changed files with 14 additions and 2 deletions
|
|
@ -1288,7 +1288,11 @@ proc customPragmaNode(n: NimNode): NimNode =
|
|||
typ = n.getTypeInst()
|
||||
|
||||
if typ.typeKind == ntyTypeDesc:
|
||||
return typ[1].getImpl()[0][1]
|
||||
let impl = typ[1].getImpl()
|
||||
if impl[0].kind == nnkPragmaExpr:
|
||||
return impl[0][1]
|
||||
else:
|
||||
return impl[0] # handle types which don't have macro at all
|
||||
|
||||
if n.kind == nnkSym: # either an variable or a proc
|
||||
let impl = n.getImpl()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue