diff options
author | Araq <rumpf_a@web.de> | 2014-03-05 08:30:05 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-03-05 08:30:05 +0100 |
commit | 4f946cb44e4fe60451b8ce4d15868ef0bce6949a (patch) | |
tree | 2111a867a40015e185b8439ac19b4a22d7b0ee7a /compiler | |
parent | 94e444c90fa1c8848b398bc163e7f78d7f0b3080 (diff) | |
download | Nim-4f946cb44e4fe60451b8ce4d15868ef0bce6949a.tar.gz |
fixes #942
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index c8d9e353a..b2b3ceb6d 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1320,7 +1320,7 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode = if n.sons[i].typ == enforceVoidContext or usesResult(n.sons[i]): voidContext = true n.typ = enforceVoidContext - if i == last and efWantValue in flags: + if i == last and (length == 1 or efWantValue in flags): n.typ = n.sons[i].typ if not isEmptyType(n.typ): n.kind = nkStmtListExpr elif i != last or voidContext or c.inTypeClass > 0: |