Chromium Code Reviews| Index: sdk/lib/collection/iterable.dart |
| diff --git a/sdk/lib/collection/iterable.dart b/sdk/lib/collection/iterable.dart |
| index 22698195763f08b01f423ac5f95c37e9583c25ed..154d19c2ddee9180cdcb9137cf4d3b3270d1fe7d 100644 |
| --- a/sdk/lib/collection/iterable.dart |
| +++ b/sdk/lib/collection/iterable.dart |
| @@ -147,7 +147,7 @@ abstract class IterableMixin<E> implements Iterable<E> { |
| return result; |
| } |
| - dynamic firstWhere(bool test(E value), { Object orElse() }) { |
| + E firstWhere(bool test(E value), { E orElse() }) { |
|
vsm
2014/12/11 01:16:22
Hmm, I guess the intent here is that orElse may re
kevmoo
2014/12/11 01:23:54
But this is not the signature of the same methods
Jacob
2014/12/11 17:32:23
Agreed. As far as I can tell this is just an overs
|
| for (E element in this) { |
| if (test(element)) return element; |
| } |
| @@ -155,7 +155,7 @@ abstract class IterableMixin<E> implements Iterable<E> { |
| throw IterableElementError.noElement(); |
| } |
| - dynamic lastWhere(bool test(E value), { Object orElse() }) { |
| + E lastWhere(bool test(E value), { E orElse() }) { |
| E result = null; |
| bool foundMatching = false; |
| for (E element in this) { |
| @@ -343,7 +343,7 @@ abstract class IterableBase<E> implements Iterable<E> { |
| return result; |
| } |
| - dynamic firstWhere(bool test(E value), { Object orElse() }) { |
| + E firstWhere(bool test(E value), { E orElse() }) { |
| for (E element in this) { |
| if (test(element)) return element; |
| } |
| @@ -351,7 +351,7 @@ abstract class IterableBase<E> implements Iterable<E> { |
| throw IterableElementError.noElement(); |
| } |
| - dynamic lastWhere(bool test(E value), { Object orElse() }) { |
| + E lastWhere(bool test(E value), { E orElse() }) { |
| E result = null; |
| bool foundMatching = false; |
| for (E element in this) { |