diff options
author | Bung <crc32@qq.com> | 2022-10-15 13:15:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 07:15:58 +0200 |
commit | 0510a2be0d6df674aa91ae3f2884d98473cade4c (patch) | |
tree | eac4583e7d17be4eb0c840b14bf8d821b11a0994 /compiler | |
parent | 57574eaf319a592f338f6b0b57a5f3a8fc0a466c (diff) | |
download | Nim-0510a2be0d6df674aa91ae3f2884d98473cade4c.tar.gz |
fix #19700 Crash when passing a template to a generic functio… (#20567)
fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 60b0fe612..7124315d9 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -2131,6 +2131,8 @@ proc paramTypesMatchAux(m: var TCandidate, f, a: PType, result = c.semInferredLambda(c, m.bindings, arg) elif arg.kind != nkSym: return nil + elif arg.sym.kind in {skMacro, skTemplate}: + return nil else: let inferred = c.semGenerateInstance(c, arg.sym, m.bindings, arg.info) result = newSymNode(inferred, arg.info) |