better error handling for better idetools support
This commit is contained in:
parent
feaf6509bd
commit
b595fc8347
13 changed files with 378 additions and 268 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue