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

Unified Diff: test/generated_sdk/lib/collection/list.dart

Issue 1112403004: SDK fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Formatting fix Created 5 years, 8 months 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: test/generated_sdk/lib/collection/list.dart
diff --git a/test/generated_sdk/lib/collection/list.dart b/test/generated_sdk/lib/collection/list.dart
index e7d902ece79cc6220c7f998359313b214eed8b1b..dd0c14a43042454de50a9a033f0d11c30c5d2f69 100644
--- a/test/generated_sdk/lib/collection/list.dart
+++ b/test/generated_sdk/lib/collection/list.dart
@@ -302,11 +302,7 @@ abstract class ListMixin<E> implements List<E> {
}
void sort([int compare(E a, E b)]) {
- if (compare == null) {
- var defaultCompare = Comparable.compare;
- compare = defaultCompare;
- }
- Sort.sort(this, compare);
+ Sort.sort(this, compare == null ? Comparable.compare : compare);
}
void shuffle([Random random]) {

Powered by Google App Engine
This is Rietveld 408576698