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

Unified Diff: sdk/lib/collection/list.dart

Issue 1937103002: Make dart:collection strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 4 years, 7 months 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
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 {

Powered by Google App Engine
This is Rietveld 408576698