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

Unified Diff: sdk/lib/collection/iterable.dart

Issue 794953002: Fix a couple type bugs in dart html and what seems like strange type choices in dart:core (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_array.dart ('k') | sdk/lib/collection/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() }) {
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) {
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_array.dart ('k') | sdk/lib/collection/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698