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

Unified Diff: lib/core/list.dart

Issue 11144016: Make argument of List.sort optional with default Comparable.compare. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: lib/core/list.dart
diff --git a/lib/core/list.dart b/lib/core/list.dart
index e44e743974677c650ce08f4dc1621155ec264c06..d362d0fc66cdfa2a6dac3b07279aa4e7adffe633 100644
--- a/lib/core/list.dart
+++ b/lib/core/list.dart
@@ -69,7 +69,7 @@ interface List<E> extends Collection<E> default ListImplementation<E> {
/**
* Sorts the list according to the order specified by the [Comparator].
*/
- void sort(Comparator<E> compare);
+ void sort([Comparator<E> compare = Comparable.compare]);
/**
* Returns the first index of [element] in the list.

Powered by Google App Engine
This is Rietveld 408576698