Index: sdk/lib/async/future.dart |
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart |
index 674fffd7bfd2c93e2aa71dca4307c50378681c0c..5fb5c022097ef4bacc939853aaf3d7e67ba2cda5 100644 |
--- a/sdk/lib/async/future.dart |
+++ b/sdk/lib/async/future.dart |
@@ -418,8 +418,8 @@ abstract class Future<T> { |
* If [f] returns a non-[Future], iteration continues immediately. Otherwise |
* it waits for the returned [Future] to complete. |
*/ |
- static Future forEach(Iterable input, f(element)) { |
- Iterator iterator = input.iterator; |
+ static Future forEach<T>(Iterable<T> input, f(T element)) { |
+ var iterator = input.iterator; |
return doWhile(() { |
if (!iterator.moveNext()) return false; |
return new Future.sync(() => f(iterator.current)).then((_) => true); |