diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2019-02-18 12:17:00 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-18 12:17:00 +0100 |
commit | cf32d61fa5084ce0f8577fd7e52c8d2070188462 (patch) | |
tree | c5134ef6b029e94841165ceb90a85e96a220261e /lib | |
parent | 8b39551fca81e95b51393a2a8e702eebe3ba7c51 (diff) | |
download | Nim-cf32d61fa5084ce0f8577fd7e52c8d2070188462.tar.gz |
Prevent crash on pragma templates w/ generics (#10685)
* Prevent crash on pragma templates w/ generics * Remove incorrect call to pragma reconversion `semOverloadedCall` may return a node with more elements than the original nkCall node had (implicit and/or explicit generics).
Diffstat (limited to 'lib')
-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 43e61d660..7ec1eefc6 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -1515,7 +1515,7 @@ macro getCustomPragmaVal*(n: typed, cp: typed{nkSym}): untyped = else: let def = p[0].getImpl[3] result = newTree(nnkPar) - for i in 1..<p.len: + for i in 1 ..< def.len: let key = def[i][0] let val = p[i] result.add newTree(nnkExprColonExpr, key, val) |