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

Unified Diff: sdk/lib/_internal/lib/js_array.dart

Issue 397243002: Make IterableMixinWorkaround using classes return correctly typed Iterables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment, Created 6 years, 5 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 | « runtime/lib/typed_data.dart ('k') | sdk/lib/collection/list.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 42ee24859b918c2df43df42a0122ddb96e258772..734523062a397c7cbca6d72748f9de5b6e10b1d9 100644
--- a/sdk/lib/_internal/lib/js_array.dart
+++ b/sdk/lib/_internal/lib/js_array.dart
@@ -147,7 +147,7 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
}
Iterable<E> where(bool f(E element)) {
- return IterableMixinWorkaround.where(this, f);
+ return new IterableMixinWorkaround<E>().where(this, f);
}
Iterable expand(Iterable f(E element)) {
@@ -181,19 +181,19 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
}
Iterable<E> take(int n) {
- return IterableMixinWorkaround.takeList(this, n);
+ return new IterableMixinWorkaround<E>().takeList(this, n);
}
Iterable<E> takeWhile(bool test(E value)) {
- return IterableMixinWorkaround.takeWhile(this, test);
+ return new IterableMixinWorkaround<E>().takeWhile(this, test);
}
Iterable<E> skip(int n) {
- return IterableMixinWorkaround.skipList(this, n);
+ return new IterableMixinWorkaround<E>().skipList(this, n);
}
Iterable<E> skipWhile(bool test(E value)) {
- return IterableMixinWorkaround.skipWhile(this, test);
+ return new IterableMixinWorkaround<E>().skipWhile(this, test);
}
E reduce(E combine(E value, E element)) {
@@ -241,7 +241,7 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
Iterable<E> getRange(int start, int end) {
- return IterableMixinWorkaround.getRangeList(this, start, end);
+ return new IterableMixinWorkaround<E>().getRangeList(this, start, end);
}
E get first {
@@ -296,7 +296,8 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
bool every(bool f(E element)) => IterableMixinWorkaround.every(this, f);
- Iterable<E> get reversed => IterableMixinWorkaround.reversedList(this);
+ Iterable<E> get reversed =>
+ new IterableMixinWorkaround<E>().reversedList(this);
void sort([int compare(E a, E b)]) {
checkMutable('sort');
@@ -365,7 +366,7 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
}
Map<int, E> asMap() {
- return IterableMixinWorkaround.asMapList(this);
+ return new IterableMixinWorkaround<E>().asMapList(this);
}
}
« no previous file with comments | « runtime/lib/typed_data.dart ('k') | sdk/lib/collection/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698