From 405cd7d1fbc92189e70763b8f22e888559214451 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 1 Jul 2014 02:09:07 +0200 Subject: [PATCH] fixes #904 --- compiler/semexprs.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index e6542a3fe8..7f97124e12 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -792,6 +792,10 @@ proc semIndirectOp(c: PContext, n: PNode, flags: TExprFlags): PNode = n.flags.incl nfExprCall result = semOverloadedCallAnalyseEffects(c, n, nOrig, flags) if result == nil: return errorNode(c, n) + elif result.kind notin nkCallKinds: + # the semExpr() in overloadedCallOpr can even break this condition! + # See bug #904 of how to trigger it: + return result #result = afterCallActions(c, result, nOrig, flags) fixAbstractType(c, result) analyseIfAddressTakenInCall(c, result)