diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-06-30 16:28:28 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-08-19 08:57:43 +0200 |
commit | 4483cefa0cceffd2d5013e3e1e0127f1a5f02a9a (patch) | |
tree | 2dd79b21ec75f892ff3d4f24bbfeb3d97ecec539 /compiler | |
parent | 43cac7f174a8a48af681443eb98a3047892c96c4 (diff) | |
download | Nim-4483cefa0cceffd2d5013e3e1e0127f1a5f02a9a.tar.gz |
fix #5918
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 4 |
1 files changed, 3 insertions, 1 deletions
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 |