Index: pkg/analyzer/lib/src/dart/element/element.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart |
index d46c864189b0b3cf1b6516337cd738da05af5e83..0ffc41ceb335f4960a1a82b391bad1a30a44e1a9 100644 |
--- a/pkg/analyzer/lib/src/dart/element/element.dart |
+++ b/pkg/analyzer/lib/src/dart/element/element.dart |
@@ -614,7 +614,9 @@ class ClassElementImpl extends ElementImpl |
@override |
PropertyAccessorElement getGetter(String getterName) { |
- for (PropertyAccessorElement accessor in _accessors) { |
+ int length = _accessors.length; |
+ for (int i = 0; i < length; i++) { |
+ PropertyAccessorElement accessor = _accessors[i]; |
if (accessor.isGetter && accessor.name == getterName) { |
return accessor; |
} |
@@ -624,7 +626,9 @@ class ClassElementImpl extends ElementImpl |
@override |
MethodElement getMethod(String methodName) { |
- for (MethodElement method in _methods) { |
+ int length = _methods.length; |
+ for (int i = 0; i < length; i++) { |
+ MethodElement method = _methods[i]; |
if (method.name == methodName) { |
return method; |
} |