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

Unified Diff: runtime/lib/byte_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/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index d4181b83a780cdb7c0dd79b5487814b586dfa89a..92181879086b034f63472d471479e4faf7dba354 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -223,7 +223,8 @@ abstract class _ByteArrayBase {
"Cannot add to a non-extendable array");
}
- void sort([Comparator compare = Comparable.compare]) {
+ void sort([int compare(var a, var b)]) {
+ if (!?compare) compare = Comparable.compare;
floitsch 2012/12/05 17:13:02 compare == null
coreSort(this, compare);
}
@@ -1767,7 +1768,8 @@ class _ByteArrayViewBase {
"Cannot add to a non-extendable array");
}
- void sort([Comparator compare = Comparable.compare]) {
+ void sort([int compare(var a, var b)]) {
+ if (!?compare) compare = Comparable.compare;
floitsch 2012/12/05 17:13:02 compare == null
coreSort(this, compare);
}

Powered by Google App Engine
This is Rietveld 408576698