From 9fdb1316868f71b99ab72de948a464456bcfe203 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 26 Mar 2014 16:22:34 +0100 Subject: [PATCH] fixes #992 --- compiler/parser.nim | 2 ++ tests/exprs/tstmtexprs.nim | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/compiler/parser.nim b/compiler/parser.nim index d59e013d78..07f5c9de9e 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -525,6 +525,8 @@ proc parsePar(p: var TParser): PNode = asgn.sons[0] = a asgn.sons[1] = b result.add(asgn) + if p.tok.tokType == tkSemiColon: + semiStmtList(p, result) elif p.tok.tokType == tkSemiColon: # stmt context: result.add(a) diff --git a/tests/exprs/tstmtexprs.nim b/tests/exprs/tstmtexprs.nim index 816e58cb1d..ed00662875 100644 --- a/tests/exprs/tstmtexprs.nim +++ b/tests/exprs/tstmtexprs.nim @@ -86,3 +86,9 @@ proc parseResponse(): PJsonNode = if (var n=result["key2"]; n != nil): excMsg &= n.str raise newException(ESynch, excMsg) + + + +#bug #992 +var se = @[1,2] +let b = (se[1] = 1; 1)