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

Unified Diff: sdk/lib/_internal/lib/js_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 | « sdk/lib/_internal/lib/collection_patch.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_array.dart
diff --git a/sdk/lib/_internal/lib/js_array.dart b/sdk/lib/_internal/lib/js_array.dart
index 2b2ddb0052db9fbaf30df04a0231215e4c310f66..f8f906aff30b3168e56326ce35c9663e425d50c8 100644
--- a/sdk/lib/_internal/lib/js_array.dart
+++ b/sdk/lib/_internal/lib/js_array.dart
@@ -143,11 +143,11 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
return IterableMixinWorkaround.fold(this, initialValue, combine);
}
- E firstWhere(bool test(E value), {E orElse()}) {
+ dynamic firstWhere(bool test(E value), {Object orElse()}) {
return IterableMixinWorkaround.firstWhere(this, test, orElse);
}
- E lastWhere(bool test(E value), {E orElse()}) {
+ dynamic lastWhere(bool test(E value), {Object orElse()}) {
return IterableMixinWorkaround.lastWhereList(this, test, orElse);
}
@@ -242,11 +242,11 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
IterableMixinWorkaround.sortList(this, compare);
}
- int indexOf(E element, [int start = 0]) {
+ int indexOf(Object element, [int start = 0]) {
return IterableMixinWorkaround.indexOfList(this, element, start);
}
- int lastIndexOf(E element, [int start]) {
+ int lastIndexOf(Object element, [int start]) {
return IterableMixinWorkaround.lastIndexOfList(this, element, start);
}
« no previous file with comments | « sdk/lib/_internal/lib/collection_patch.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698