Merge branch 'devel' of github.com:Araq/Nimrod into devel

This commit is contained in:
Zahary Karadjov 2014-03-06 23:25:45 +02:00
commit 2cbe46daff
23 changed files with 280 additions and 55 deletions

View file

@ -1323,7 +1323,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: