Index: runtime/lib/array.dart |
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
index 5bef0d0db28ec84e79e2c396c37e0822799c5a66..e63af507ca8090efd78afc038cc60d47ca3de902 100644 |
--- a/runtime/lib/array.dart |
+++ b/runtime/lib/array.dart |
@@ -92,7 +92,8 @@ class _ObjectArray<E> implements List<E> { |
return this.length == 0; |
} |
- void sort([Comparator<E> compare = Comparable.compare]) { |
+ void sort([int compare(E a, E b)]) { |
+ if (compare == null) compare = Comparable.compare; |
_Sort.sort(this, compare); |
} |
@@ -238,7 +239,7 @@ class _ImmutableArray<E> implements List<E> { |
return this.length == 0; |
} |
- void sort([Comparator<E> compare]) { |
+ void sort([int compare(E a, E b)]) { |
throw new UnsupportedError( |
"Cannot modify an immutable array"); |
} |