Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: pkg/collection_helpers/lib/typed_buffers.dart

Issue 76233003: Add explicit cast to avoid bug in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/collection_helpers/lib/typed_buffers.dart
diff --git a/pkg/collection_helpers/lib/typed_buffers.dart b/pkg/collection_helpers/lib/typed_buffers.dart
index 06f83cf2d2d1c7833f5a617e03330d737816b21d..cad9a11ff4c669fca86460c5fc4b69385a294673 100644
--- a/pkg/collection_helpers/lib/typed_buffers.dart
+++ b/pkg/collection_helpers/lib/typed_buffers.dart
@@ -117,7 +117,9 @@ abstract class _TypedDataBuffer<E> extends ListBase<E> {
void setRange(int start, int end, Iterable<E> source, [int skipCount = 0]) {
if (end > _length) throw new RangeError.range(end, 0, _length);
if (source is _TypedDataBuffer) {
- _buffer.setRange(start, end, source._buffer, skipCount);
+ // Remove this cast when 15156 is fixed.
floitsch 2013/11/19 12:28:36 TODO(15156): Remove this cast.
+ _TypedDataBuffer sourceBuffer = source;
+ _buffer.setRange(start, end, sourceBuffer._buffer, skipCount);
} else {
_buffer.setRange(start, end, source, skipCount);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698