From b595fc834735be1edb31a487464eb447c45d20c4 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 29 Jul 2012 23:08:28 +0200 Subject: better error handling for better idetools support --- compiler/semtypinst.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/semtypinst.nim') 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") -- cgit 1.4.1-2-gfad0