summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r--compiler/semtypinst.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 8b9b7b13b..33de40f34 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -19,7 +19,7 @@ proc sharedPtrCheck(info: TLineInfo, t: PType) =
     if t.sons[0].sym.magic in {mShared, mGuarded}:
       incl(t.flags, tfShared)
       if t.sons[0].sym.magic == mGuarded: incl(t.flags, tfGuarded)
-      if tfHasGCedMem in t.flags:
+      if tfHasGCedMem in t.flags or t.isGCedMem:
         localError(info, errGenerated,
                    "shared memory may not refer to GC'ed thread local memory")
 
@@ -352,8 +352,9 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
     result = handleGenericInvokation(cl, t)
 
   of tyGenericBody:
-    internalError(cl.info, "ReplaceTypeVarsT: tyGenericBody" )
-    result = replaceTypeVarsT(cl, lastSon(t))
+    localError(cl.info, errCannotInstantiateX, typeToString(t))
+    result = t
+    #result = replaceTypeVarsT(cl, lastSon(t))
 
   of tyFromExpr:
     if cl.allowMetaTypes: return