diff options
Diffstat (limited to 'compiler/semexprs.nim')
-rwxr-xr-x | compiler/semexprs.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index d403aeef1..3bbc0c71f 100755 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -36,6 +36,15 @@ proc semExprWithType(c: PContext, n: PNode, flags: TExprFlags = {}): PNode = GlobalError(n.info, errExprXHasNoType, renderTree(result, {renderNoComments})) +proc semExprNoDeref(c: PContext, n: PNode, flags: TExprFlags = {}): PNode = + result = semExpr(c, n, flags) + if result.kind == nkEmpty: + # do not produce another redundant error message: + raiseRecoverableError() + if result.typ == nil: + GlobalError(n.info, errExprXHasNoType, + renderTree(result, {renderNoComments})) + proc semSymGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode = result = symChoice(c, n, s) |