summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-09-01 22:05:05 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-09-03 11:12:19 +0200
commit1528d7c6e8ede680e3810ffcf538ca5fda9abfc2 (patch)
treecf0b4d3804d19174a1735ca884b2068062a10e7c
parent46948a9509d77e025b33e4f890bf510b4eec9d46 (diff)
downloadNim-1528d7c6e8ede680e3810ffcf538ca5fda9abfc2.tar.gz
fixes #4677
-rw-r--r--compiler/semtypinst.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 12620d55d..b809afab6 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: