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

Unified Diff: pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart

Issue 2311513002: Fix type errors in sort(). (Closed)
Patch Set: Created 4 years, 3 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: pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart b/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart
index 7e6dbd3adc18306ba52249a85ea852921eec7a17..9e6924fcc00f14375b567f6520cc7ab07fdfde71 100644
--- a/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart
+++ b/pkg/dev_compiler/tool/input_sdk/lib/collection/list.dart
@@ -309,7 +309,7 @@ abstract class ListMixin<E> implements List<E> {
void sort([int compare(E a, E b)]) {
if (compare == null) {
- Sort.sort(this, Comparable.compare);
+ Sort.sort(this, (a, b) => (a as Comparable).compareTo(b));
} else {
Sort.sort(this, compare);
}

Powered by Google App Engine
This is Rietveld 408576698