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

Unified Diff: runtime/lib/growable_array.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: Updated to tup of tree. 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
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index 2e012c20b720a458611be2dde5a8e0ba51b895eb..046e2c75d524a6916903ab8f78faf7305e5bae10 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -211,7 +211,8 @@ class _GrowableObjectArray<T> implements List<T> {
this.length = 0;
}
- void sort([Comparator<T> compare = Comparable.compare]) {
+ void sort([int compare(T a, T b)]) {
+ if (!?compare) compare = Comparable.compare;
floitsch 2012/12/05 17:13:02 compare == null
_Sort.sort(this, compare);
}

Powered by Google App Engine
This is Rietveld 408576698