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

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

Issue 2311513002: Fix type errors in sort(). (Closed)
Patch Set: Use Comparable.compare(). 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
« no previous file with comments | « pkg/dev_compiler/lib/js/legacy/dart_sdk.js ('k') | pkg/dev_compiler/tool/input_sdk/private/js_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..37fdf0a366cf27dd98e80e22719218d2e0815806 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) => Comparable.compare(a, b));
} else {
Sort.sort(this, compare);
}
« no previous file with comments | « pkg/dev_compiler/lib/js/legacy/dart_sdk.js ('k') | pkg/dev_compiler/tool/input_sdk/private/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698