Index: runtime/lib/array.dart |
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
index 0f10ceb2b541e9a3cbb45015e3080469044183fb..a4182b8f7c019f413a6abffa99f0304fcc0f89e0 100644 |
--- a/runtime/lib/array.dart |
+++ b/runtime/lib/array.dart |
@@ -60,6 +60,10 @@ class _ObjectArray<E> implements List<E> { |
"Cannot remove element of a non-extendable array"); |
} |
+ Iterable<E> getRange(int start, [int end]) { |
+ return IterableMixinWorkaround.getRangeList(this, start, end); |
+ } |
+ |
// List interface. |
void setRange(int start, int length, List<E> from, [int startFrom = 0]) { |
if (length < 0) { |
@@ -94,8 +98,6 @@ class _ObjectArray<E> implements List<E> { |
return list; |
} |
- List<E> getRange(int start, int length) => sublist(start, start + length); |
- |
// Iterable interface. |
bool contains(E element) { |
@@ -337,7 +339,9 @@ class _ImmutableArray<E> implements List<E> { |
return list; |
} |
- List<E> getRange(int start, int length) => sublist(start, start + length); |
+ Iterable<E> getRange(int start, int end) { |
+ return IterableMixinWorkaround.getRangeList(this, start, end); |
+ } |
// Collection interface. |