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

Unified Diff: sdk/lib/collection/iterable.dart

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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: sdk/lib/collection/iterable.dart
diff --git a/sdk/lib/collection/iterable.dart b/sdk/lib/collection/iterable.dart
index 2ec143b8c495e2a462275c06b3f4118b4b9cb5fa..cff588dcc282d181e79baa80f0395ee2afcd3dfc 100644
--- a/sdk/lib/collection/iterable.dart
+++ b/sdk/lib/collection/iterable.dart
@@ -17,7 +17,7 @@ abstract class IterableMixin<E> implements Iterable<E> {
Iterable expand(Iterable f(E element)) =>
new ExpandIterable<E, dynamic>(this, f);
- bool contains(E element) {
+ bool contains(Object element) {
for (E e in this) {
if (e == element) return true;
}
@@ -209,7 +209,7 @@ abstract class IterableBase<E> implements Iterable<E> {
Iterable expand(Iterable f(E element)) =>
new ExpandIterable<E, dynamic>(this, f);
- bool contains(E element) {
+ bool contains(Object element) {
for (E e in this) {
if (e == element) return true;
}

Powered by Google App Engine
This is Rietveld 408576698