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

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

Issue 11269004: Change List.sort to not have a default parameter value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reverted used of ?compare Created 8 years 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 | « sdk/lib/_internal/compiler/implementation/lib/js_array.dart ('k') | sdk/lib/core/sequences.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/list.dart
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 43a98876e04705bd33bc520e26a5f16c45b147ec..030596a8d2c0b77edf9825fb36fe950ad0f429f9 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -72,9 +72,13 @@ abstract class List<E> implements Collection<E>, Sequence<E> {
void addAll(Collection<E> collection);
/**
- * Sorts the list according to the order specified by the [Comparator].
+ * Sorts the list according to the order specified by the [compare] function.
+ *
+ * The [compare] function must act as a [Comparator].
+ * The default [List] implementations use [Comparable.compare] if
+ * [compare] is omitted.
*/
- void sort([Comparator<E> compare = Comparable.compare]);
+ void sort([int compare(E a, E b)]);
/**
* Returns the first index of [element] in the list.
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/js_array.dart ('k') | sdk/lib/core/sequences.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698