Index: sdk/lib/collection/list.dart |
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart |
index 4b9e0f1ec5b1a0b4104585a21fc3c0670b589fe1..84d9208f21b94ea77c08c17d73732d7340e1d12e 100644 |
--- a/sdk/lib/collection/list.dart |
+++ b/sdk/lib/collection/list.dart |
@@ -342,14 +342,14 @@ abstract class ListMixin<E> implements List<E> { |
} |
} |
- void removeRange(int start, int length) { |
+ void removeRange(int start, int end) { |
if (start < 0 || start > this.length) { |
throw new RangeError.range(start, 0, this.length); |
} |
- if (length < 0 || start + length > this.length) { |
- throw new RangeError.range(length, 0, this.length - start); |
+ if (end < start || end > this.length) { |
+ throw new RangeError.range(end, start, this.length); |
} |
- int end = start + length; |
+ int length = end - start; |
setRange(start, this.length - length, this, end); |
this.length -= length; |
} |