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

Unified Diff: sdk/lib/collection/set.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/list.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/set.dart
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
index 74707611a7bbe6ca32cb97947dbf28bfe0ccb247..309355c15fef4249e3cbb6576edfade2a73b876e 100644
--- a/sdk/lib/collection/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -232,7 +232,7 @@ abstract class SetMixin<E> implements Set<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;
}
@@ -240,7 +240,7 @@ abstract class SetMixin<E> implements Set<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/collection/list.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698