Index: runtime/lib/array.dart |
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
index e16cbef904c657979f7124d82b9b251a687e3adb..6582248e3dc6150b9ef33254d81a469d41d0ce92 100644 |
--- a/runtime/lib/array.dart |
+++ b/runtime/lib/array.dart |
@@ -202,6 +202,10 @@ class _ObjectArray<E> implements List<E> { |
IterableMixinWorkaround.sortList(this, compare); |
} |
+ void shuffle() { |
+ IterableMixinWorkaround.shuffleList(this); |
+ } |
+ |
int indexOf(Object element, [int start = 0]) { |
return Arrays.indexOf(this, element, start, this.length); |
} |
@@ -456,6 +460,11 @@ class _ImmutableArray<E> implements List<E> { |
"Cannot modify an immutable array"); |
} |
+ void shuffle() { |
+ throw new UnsupportedError( |
+ "Cannot modify an immutable array"); |
+ } |
+ |
String toString() { |
return IterableMixinWorkaround.toStringIterable(this, '[', ']'); |
} |