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

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

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type error. Created 7 years, 6 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_dev/iterable.dart
diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart
index a6a65b2096be9f464f02c67003decdce7f2b6caf..bd93109ffd8ba1d23deb2e9521ed2d8efb93b42c 100644
--- a/sdk/lib/_collection_dev/iterable.dart
+++ b/sdk/lib/_collection_dev/iterable.dart
@@ -46,7 +46,7 @@ abstract class ListIterable<E> extends IterableBase<E> {
return elementAt(0);
}
- bool contains(E element) {
+ bool contains(Object element) {
int length = this.length;
for (int i = 0; i < length; i++) {
if (elementAt(i) == element) return true;
@@ -608,7 +608,7 @@ class EmptyIterable<E> extends IterableBase<E> {
E elementAt(int index) { throw new RangeError.value(index); }
- bool contains(E element) => false;
+ bool contains(Object element) => false;
bool every(bool test(E element)) => true;

Powered by Google App Engine
This is Rietveld 408576698