about summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
-rw-r--r--src/comp/syntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 8f632165772..4df2b6ab3cf 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1585,7 +1585,8 @@ fn parse_source_stmt(p: parser) -> @ast::stmt {
             // Remainder are line-expr stmts.
             let e = parse_expr(p);
             // See if it is a block call
-            if p.peek() == token::LBRACE && is_bar(p.look_ahead(1u)) {
+            if expr_has_value(e) && p.peek() == token::LBRACE &&
+               is_bar(p.look_ahead(1u)) {
                 p.bump();
                 let blk = parse_fn_block_expr(p);
                 alt e.node {