Index: pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart b/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart |
index 37fdf0a366cf27dd98e80e22719218d2e0815806..f99944779c138c8c076e1f59af7af6b0ecb33fdb 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart |
@@ -267,17 +267,16 @@ abstract class ListMixin<E> implements List<E> { |
} |
void removeWhere(bool test(E element)) { |
- _filter(this, test, false); |
+ _filter(test, false); |
} |
void retainWhere(bool test(E element)) { |
- _filter(this, test, true); |
+ _filter(test, true); |
} |
- static void _filter(List source, |
- bool test(var element), |
- bool retainMatching) { |
- List retained = []; |
+ void _filter(bool test(var element), bool retainMatching) { |
+ var source = this; |
+ var retained = <E>[]; |
int length = source.length; |
for (int i = 0; i < length; i++) { |
var element = source[i]; |