Index: runtime/lib/array.dart |
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
index 688cfb5e02380e9ee38e4b5c0a10da678da99c7c..d73ec4c471af854ab5f39c5c8628b3825c691215 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"; |
+ void insertAt(int index, E element) { |
+ throw new UnsupportedError( |
+ "Cannot add to a non-extendable array"); |
+ } |
+ |
E removeAt(int index) { |
throw new UnsupportedError( |
"Cannot remove element of a non-extendable array"); |
@@ -261,6 +266,11 @@ class _ImmutableArray<E> implements List<E> { |
int get length native "ObjectArray_getLength"; |
+ void insertAt(int index, E element) { |
+ throw new UnsupportedError( |
+ "Cannot add to a non-extendable array"); |
srdjan
2013/03/04 00:53:47
to an immutable array
Lasse Reichstein Nielsen
2013/03/04 09:06:02
Consider changing "immutable" to "unmodifiable" wh
floitsch
2013/03/05 17:51:58
Done.
floitsch
2013/03/05 17:51:58
not in this CL. Filed http://dartbug.com/8925
|
+ } |
+ |
E removeAt(int index) { |
throw new UnsupportedError( |
"Cannot modify an immutable array"); |