Chromium Code Reviews| Index: runtime/lib/growable_array.dart |
| diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart |
| index abdbb9d4959258209678f6b858f8049ebe32c66f..08a5c178370629c23d08afa7964bf2fd8fb3b7be 100644 |
| --- a/runtime/lib/growable_array.dart |
| +++ b/runtime/lib/growable_array.dart |
| @@ -8,8 +8,9 @@ class GrowableObjectArray<T> implements List<T> { |
| "GrowableObjectArray can only be allocated by the VM"); |
| } |
| - E removeAt(int index) { |
| - E result = this[index]; |
| + T removeAt(int index) { |
| + if (index is! int) throw new IllegalArgumentException(index); |
| + T result = this[index]; |
| Arrays.copy(this, |
|
kasperl
2012/09/20 12:42:41
Cache this.length in a local variable?
Lasse Reichstein Nielsen
2012/09/20 12:52:30
Better yet, I'll cache this.length - 1.
|
| index + 1, |
| this, |