Fix getting custom pragma from generic object (#20481)
* Merge devel Add another test case * Fix test Use getCustomPragmaVal instead of hasCustomPragma Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
This commit is contained in:
parent
e4e947232b
commit
1e52423774
2 changed files with 19 additions and 1 deletions
|
|
@ -1591,7 +1591,7 @@ proc customPragmaNode(n: NimNode): NimNode =
|
|||
elif impl.kind in {nnkIdentDefs, nnkConstDef} and impl[0].kind == nnkPragmaExpr:
|
||||
return impl[0][1]
|
||||
else:
|
||||
let timpl = typ.getImpl()
|
||||
let timpl = getImpl(if typ.kind == nnkBracketExpr: typ[0] else: typ)
|
||||
if timpl.len>0 and timpl[0].len>1:
|
||||
return timpl[0][1]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue