diff options
author | Jake Leahy <jake@leahy.dev> | 2023-01-12 12:44:33 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-11 20:44:33 -0500 |
commit | 1e52423774e81f71d10a712575fd65231705362e (patch) | |
tree | 5acb908b0437cd3294114f110ada030add69df61 /lib/core | |
parent | e4e947232b9e054cd55c9fefe3ea97f47619a5ca (diff) | |
download | Nim-1e52423774e81f71d10a712575fd65231705362e.tar.gz |
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>
Diffstat (limited to 'lib/core')
-rw-r--r-- | lib/core/macros.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index beb3aa695..9cb694bd8 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -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: |