Index: runtime/lib/array.dart |
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart |
index 5bef0d0db28ec84e79e2c396c37e0822799c5a66..37c9ce975af63ea1d9d1a75bf5f2db0653184e86 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) compare = Comparable.compare; |
floitsch
2012/12/05 17:13:02
compare == null
|
_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"); |
} |