Skip to content

Commit

Permalink
fix for nim-lang#19020, credit to @ElegantBeef (nim-lang#19021)
Browse files Browse the repository at this point in the history
  • Loading branch information
geekrelief authored and PMunch committed Mar 28, 2022
1 parent ee2bcaf commit a61910b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/macros.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ macro getCustomPragmaVal*(n: typed, cp: typed{nkSym}): untyped =
let pragmaNode = customPragmaNode(n)
for p in pragmaNode:
if p.kind in nnkPragmaCallKinds and p.len > 0 and p[0].kind == nnkSym and p[0] == cp:
if p.len == 2:
if p.len == 2 or (p.len == 3 and p[1].kind == nnkSym and p[1].symKind == nskType):
result = p[1]
else:
let def = p[0].getImpl[3]
Expand Down

0 comments on commit a61910b

Please sign in to comment.