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

Unified Diff: runtime/lib/array.dart

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to upload before committing 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
« no previous file with comments | « pkg/serialization/lib/src/serialization_helpers.dart ('k') | runtime/lib/collection_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index cfb640bc01c076d959d31a7d88458025a50cf313..e7f88a3ddb70525e20e355a8f54c50925bee8165 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -118,7 +118,7 @@ class _ObjectArray<E> implements List<E> {
// Iterable interface.
- bool contains(E element) {
+ bool contains(Object element) {
return IterableMixinWorkaround.contains(this, element);
}
@@ -202,11 +202,11 @@ class _ObjectArray<E> implements List<E> {
IterableMixinWorkaround.sortList(this, compare);
}
- int indexOf(E element, [int start = 0]) {
+ int indexOf(Object element, [int start = 0]) {
return Arrays.indexOf(this, element, start, this.length);
}
- int lastIndexOf(E element, [int start = null]) {
+ int lastIndexOf(Object element, [int start = null]) {
if (start == null) start = length - 1;
return Arrays.lastIndexOf(this, element, start);
}
@@ -371,7 +371,7 @@ class _ImmutableArray<E> implements List<E> {
// Collection interface.
- bool contains(E element) {
+ bool contains(Object element) {
return IterableMixinWorkaround.contains(this, element);
}
@@ -460,11 +460,11 @@ class _ImmutableArray<E> implements List<E> {
return ToString.iterableToString(this);
}
- int indexOf(E element, [int start = 0]) {
+ int indexOf(Object element, [int start = 0]) {
return Arrays.indexOf(this, element, start, this.length);
}
- int lastIndexOf(E element, [int start = null]) {
+ int lastIndexOf(Object element, [int start = null]) {
if (start == null) start = length - 1;
return Arrays.lastIndexOf(this, element, start);
}
« no previous file with comments | « pkg/serialization/lib/src/serialization_helpers.dart ('k') | runtime/lib/collection_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698