From 1528d7c6e8ede680e3810ffcf538ca5fda9abfc2 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 1 Sep 2016 22:05:05 +0200 Subject: [PATCH] fixes #4677 --- compiler/semtypinst.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: