| Index: sdk/lib/async/stream.dart
|
| diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
|
| index 375f493ff5a7f92e26a0eaca7b67317decc60ce3..0ed18d09ad46108aaa4d006ae97a58c414ed0777 100644
|
| --- a/sdk/lib/async/stream.dart
|
| +++ b/sdk/lib/async/stream.dart
|
| @@ -373,7 +373,10 @@ abstract class Stream<T> {
|
| * If [compare] is omitted, it defaults to [Comparable.compare].
|
| */
|
| Future<T> min([int compare(T a, T b)]) {
|
| - if (compare == null) compare = Comparable.compare;
|
| + if (compare == null) {
|
| + var defaultCompare = Comparable.compare;
|
| + compare = defaultCompare;
|
| + }
|
| _FutureImpl<T> future = new _FutureImpl<T>();
|
| StreamSubscription subscription;
|
| T min = null;
|
| @@ -414,7 +417,10 @@ abstract class Stream<T> {
|
| * If [compare] is omitted, it defaults to [Comparable.compare].
|
| */
|
| Future<T> max([int compare(T a, T b)]) {
|
| - if (compare == null) compare = Comparable.compare;
|
| + if (compare == null) {
|
| + var defaultCompare = Comparable.compare;
|
| + compare = defaultCompare;
|
| + }
|
| _FutureImpl<T> future = new _FutureImpl<T>();
|
| StreamSubscription subscription;
|
| T max = null;
|
|
|