diff options
Diffstat (limited to 'compiler/semtypinst.nim')
-rwxr-xr-x | compiler/semtypinst.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 8cd7c3d1a..d75594dff 100755 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -119,7 +119,8 @@ proc ReplaceTypeVarsS(cl: var TReplTypeVars, s: PSym): PSym = proc lookupTypeVar(cl: TReplTypeVars, t: PType): PType = result = PType(idTableGet(cl.typeMap, t)) if result == nil: - GlobalError(t.sym.info, errCannotInstantiateX, typeToString(t)) + LocalError(t.sym.info, errCannotInstantiateX, typeToString(t)) + result = errorType(cl.c) elif result.kind == tyGenericParam: InternalError(cl.info, "substitution with generic parameter") |