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

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: 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: 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..fd4c9c1ea8f30f58ccf8464043be857a72e9111f 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) compare = Comparable.compare;
floitsch 2012/12/05 17:13:02 compare == null
_internal.sort(compare);
recordGlobalChange();
}

Powered by Google App Engine
This is Rietveld 408576698