diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 12620d55df..b809afab65 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -463,7 +463,8 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType = result.sons[i] = r propagateToOwner(result, r) - result.n = replaceTypeVarsN(cl, result.n) + if result.kind != tyProc: + result.n = replaceTypeVarsN(cl, result.n) case result.kind of tyArray: