Chromium Code Reviews| Index: runtime/vm/parser.cc |
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
| index 1b7cec334caab0980f4f066e7dbfebee28454909..99b7fcb9831619356059c8bfd5ff7e562ad7de66 100644 |
| --- a/runtime/vm/parser.cc |
| +++ b/runtime/vm/parser.cc |
| @@ -9028,13 +9028,14 @@ AstNode* Parser::ParseForInStatement(TokenPosition forin_pos, |
| loop_var_name = ExpectIdentifier("variable name expected"); |
| } |
| ExpectToken(Token::kIN); |
| + |
| + OpenBlock(); // Implicit block around while loop. |
|
hausner
2016/07/29 17:59:35
Maybe add a comment that explains why we open a bl
regis
2016/07/29 21:31:47
Done.
|
| + |
| const TokenPosition collection_pos = TokenPos(); |
| AstNode* collection_expr = |
| ParseAwaitableExpr(kAllowConst, kConsumeCascades, NULL); |
| ExpectToken(Token::kRPAREN); |
| - OpenBlock(); // Implicit block around while loop. |
| - |
| // Generate implicit iterator variable and add to scope. |
| // We could set the type of the implicit iterator variable to Iterator<T> |
| // where T is the type of the for loop variable. However, the type error |