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

Unified Diff: samples/swarm/swarm_ui_lib/observable/observable.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/growable_array.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/js_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/observable/observable.dart
diff --git a/samples/swarm/swarm_ui_lib/observable/observable.dart b/samples/swarm/swarm_ui_lib/observable/observable.dart
index b7663964e1df0a5a2fbfa6ec4ac5b6bb127c8434..62825b11901bd815b4ac37810432bb15e2c13601 100644
--- a/samples/swarm/swarm_ui_lib/observable/observable.dart
+++ b/samples/swarm/swarm_ui_lib/observable/observable.dart
@@ -158,7 +158,8 @@ class ObservableList<T>
recordGlobalChange();
}
- void sort([Comparator compare = Comparable.compare]) {
+ void sort([int compare(var a, var b)]) {
+ if (compare == null) compare = Comparable.compare;
_internal.sort(compare);
recordGlobalChange();
}
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698