From 4483cefa0cceffd2d5013e3e1e0127f1a5f02a9a Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Fri, 30 Jun 2017 16:28:28 +0300 Subject: fix #5918 --- compiler/sigmatch.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 6084e11c0..41596f05c 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -297,7 +297,9 @@ proc describeArgs*(c: PContext, n: PNode, startIdx = 1; n.sons[i].typ = arg.typ n.sons[i].sons[1] = arg else: - if arg.typ.isNil and arg.kind notin {nkStmtList, nkDo}: + if arg.typ.isNil and arg.kind notin {nkStmtList, nkDo, nkElse, + nkOfBranch, nkElifBranch, + nkExceptBranch}: arg = c.semOperand(c, n.sons[i]) n.sons[i] = arg if arg.typ != nil and arg.typ.kind == tyError: return -- cgit 1.4.1-2-gfad0