Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Unified Diff: lib/compiler/implementation/resolver.dart

Issue 11066052: Disallow non-identifiers in for-in. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/resolver.dart
diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
index d08b6f60ca5ce0cc308a54015c56b5e351805294..f176afcc3be3e607e0f73b978cf0acdf10730ab1 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -2020,7 +2020,8 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
visitLoopBodyIn(node, node.body, blockScope);
// TODO(lrn): Also allow a single identifier.
- if ((declaration is !Send || declaration.asSend().selector is !Identifier)
+ if ((declaration is !Send || declaration.asSend().selector is !Identifier
+ || declaration.asSend().receiver != null)
&& (declaration is !VariableDefinitions ||
!declaration.asVariableDefinitions().definitions.nodes.tail.isEmpty()))
{
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698