Index: pkg/typed_data/lib/typed_buffers.dart |
diff --git a/pkg/typed_data/lib/typed_buffers.dart b/pkg/typed_data/lib/typed_buffers.dart |
index b8803388084ae126a2102299ffdf9e87b6e518f8..50ed2414c4cbd58d196a720e9706ecf31338a18e 100644 |
--- a/pkg/typed_data/lib/typed_buffers.dart |
+++ b/pkg/typed_data/lib/typed_buffers.dart |
@@ -32,12 +32,12 @@ abstract class _TypedDataBuffer<E> extends ListBase<E> { |
int get length => _length; |
E operator[](int index) { |
- if (index >= length) throw new RangeError.range(index, 0, length - 1); |
+ if (index >= length) throw new RangeError.index(index, this); |
return _buffer[index]; |
} |
void operator[]=(int index, E value) { |
- if (index >= length) throw new RangeError.range(index, 0, length - 1); |
+ if (index >= length) throw new RangeError.index(index, this); |
_buffer[index] = value; |
} |