Chromium Code Reviews| Index: runtime/lib/array.dart |
| diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
| index b0dcf3a6efe844432ef491910f53a682f3d3d9bc..1fba6dbd19a7403e0c741c511512e3dac5bb887d 100644 |
| --- a/runtime/lib/array.dart |
| +++ b/runtime/lib/array.dart |
| @@ -24,6 +24,11 @@ class ObjectArray<E> implements List<E> { |
| int count) |
| native "ObjectArray_copyFromObjectArray"; |
| + E removeAt(int index) { |
| + throw const UnsupportedOperationException( |
| + "Cannot remove element of a non-extendable array"); |
| + } |
| + |
| void setRange(int start, int length, List<E> from, [int startFrom = 0]) { |
| if (length < 0) { |
| throw new IllegalArgumentException("negative length $length"); |
| @@ -161,6 +166,11 @@ class ImmutableArray<E> implements List<E> { |
| int get length native "ObjectArray_getLength"; |
| + E removeAt(int index) { |
| + throw const UnsupportedOperationException( |
| + "Cannot modify an immitable array"); |
|
Johnni Winther
2012/09/20 09:22:50
immitable => immutable
Lasse Reichstein Nielsen
2012/09/20 10:50:29
Done.
|
| + } |
| + |
| void copyFrom(List src, int srcStart, int dstStart, int count) { |
| throw const UnsupportedOperationException( |
| "Cannot modify an immutable array"); |