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

Unified Diff: sdk/lib/internal/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/html/html_common/filtered_element_list.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/internal/iterable.dart
diff --git a/sdk/lib/internal/iterable.dart b/sdk/lib/internal/iterable.dart
index deb76fc70880839f2313f862098dd65cfb3ef255..87c5f141b32787219504f5a54b413e9dc6596c3c 100644
--- a/sdk/lib/internal/iterable.dart
+++ b/sdk/lib/internal/iterable.dart
@@ -94,7 +94,7 @@ abstract class ListIterable<E> extends IterableBase<E>
return false;
}
- dynamic firstWhere(bool test(E element), { Object orElse() }) {
+ E firstWhere(bool test(E element), { E orElse() }) {
int length = this.length;
for (int i = 0; i < length; i++) {
E element = elementAt(i);
@@ -107,7 +107,7 @@ abstract class ListIterable<E> extends IterableBase<E>
throw IterableElementError.noElement();
}
- dynamic lastWhere(bool test(E element), { Object orElse() }) {
+ E lastWhere(bool test(E element), { E orElse() }) {
int length = this.length;
for (int i = length - 1; i >= 0; i--) {
E element = elementAt(i);
« no previous file with comments | « sdk/lib/html/html_common/filtered_element_list.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698