nimsuggest: first version

This commit is contained in:
Araq 2015-01-26 21:38:39 +01:00
commit 26b853923c
21 changed files with 364 additions and 218 deletions

View file

@ -84,8 +84,9 @@ proc notFoundError*(c: PContext, n: PNode, errors: CandidateErrors) =
if c.inCompilesContext > 0:
# fail fast:
globalError(n.info, errTypeMismatch, "")
if errors.len == 0:
if errors.isNil or errors.len == 0:
localError(n.info, errExprXCannotBeCalled, n[0].renderTree)
return
# to avoid confusing errors like:
# got (SslPtr, SocketHandle)