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

Unified Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 1783053005: Fix all for-in warnings in dart2js (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: pkg/compiler/lib/src/tree/nodes.dart
diff --git a/pkg/compiler/lib/src/tree/nodes.dart b/pkg/compiler/lib/src/tree/nodes.dart
index 6eb072163acb07219144fc405b3fa72b20607d95..989eec7c334b6bb19d47b3b2b991de9dff57cb3c 100644
--- a/pkg/compiler/lib/src/tree/nodes.dart
+++ b/pkg/compiler/lib/src/tree/nodes.dart
@@ -572,7 +572,7 @@ class NewExpression extends Expression {
Token getEndToken() => send.getEndToken();
}
-class NodeList extends Node {
+class NodeList extends Node with IterableMixin<Node> {
final Link<Node> nodes;
final Token beginToken;
final Token endToken;
@@ -588,6 +588,10 @@ class NodeList extends Node {
NodeList asNodeList() => this;
+ get length {
+ throw new UnsupportedError('use slowLength() instead of get:length');
+ }
+
int slowLength() {
int result = 0;
for (Link<Node> cursor = nodes; !cursor.isEmpty; cursor = cursor.tail) {

Powered by Google App Engine
This is Rietveld 408576698