diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-04-10 12:08:36 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2017-04-10 12:08:40 +0300 |
commit | e7eb01ed4887ffb15a308b3599461ba42f4d7f8a (patch) | |
tree | 4e9454364fb63e9de2ddc085cd366681bfea957e /tests/parser | |
parent | 9ffaee3f8803a6fce35bf784c8870ea238747e13 (diff) | |
download | Nim-e7eb01ed4887ffb15a308b3599461ba42f4d7f8a.tar.gz |
fix a parsing regression (calls with do inside param lists)
This treatment is applied only when "do" is used, because the code foo(x: bar) is recognized as object construction.
Diffstat (limited to 'tests/parser')
-rw-r--r-- | tests/parser/tpostexprblocks.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/parser/tpostexprblocks.nim b/tests/parser/tpostexprblocks.nim index 785ecdd89..b7f97785b 100644 --- a/tests/parser/tpostexprblocks.nim +++ b/tests/parser/tpostexprblocks.nim @@ -211,6 +211,18 @@ StmtList StmtList DiscardStmt Empty + Call + Ident !"foo" + Ident !"x" + Call + Ident !"bar" + StmtList + DiscardStmt + Empty + Else + StmtList + DiscardStmt + Empty VarSection IdentDefs Ident !"a" @@ -432,6 +444,13 @@ dumpTree: else: discard + # call with blocks as a param + foo(x, bar do: + discard + else: + discard + ) + # introduce a variable var a = foo var a = foo() |