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

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: 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 | « runtime/lib/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index d4181b83a780cdb7c0dd79b5487814b586dfa89a..f4d0d3f313580ddfd1f6a747f6c376dbd48d5986 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 == null) compare = Comparable.compare;
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 == null) compare = Comparable.compare;
coreSort(this, compare);
}
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698