Index: sdk/lib/collection/list.dart |
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart |
index 64586d3a21c6df178e1760a34f0aa171df362f6a..7e6dbd3adc18306ba52249a85ea852921eec7a17 100644 |
--- a/sdk/lib/collection/list.dart |
+++ b/sdk/lib/collection/list.dart |
@@ -309,10 +309,10 @@ abstract class ListMixin<E> implements List<E> { |
void sort([int compare(E a, E b)]) { |
if (compare == null) { |
- var defaultCompare = Comparable.compare; |
- compare = defaultCompare; |
+ Sort.sort(this, Comparable.compare); |
+ } else { |
+ Sort.sort(this, compare); |
} |
- Sort.sort(this, compare); |
} |
void shuffle([Random random]) { |
@@ -368,10 +368,10 @@ abstract class ListMixin<E> implements List<E> { |
if (length == 0) return; |
RangeError.checkNotNegative(skipCount, "skipCount"); |
- List otherList; |
+ List<E> otherList; |
int otherStart; |
// TODO(floitsch): Make this accept more. |
- if (iterable is List) { |
+ if (iterable is List/*<E>*/) { |
otherList = iterable; |
otherStart = skipCount; |
} else { |