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

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

Issue 791453005: Tighten a couple type annotations in IterableMixin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed ListMixin and SetMixin 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/collection/iterable.dart ('k') | sdk/lib/collection/set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/list.dart
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index b7401e9a27cb086e346e99241c39d046d42a8e36..e7d902ece79cc6220c7f998359313b214eed8b1b 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -120,7 +120,7 @@ abstract class ListMixin<E> implements List<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 = this[i];
@@ -133,7 +133,7 @@ abstract class ListMixin<E> implements List<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 = this[i];
« no previous file with comments | « sdk/lib/collection/iterable.dart ('k') | sdk/lib/collection/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698