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

Unified Diff: sdk/lib/async/future.dart

Issue 2851443002: Fix bug in Future.forEach. Add tests. (Closed)
Patch Set: Created 3 years, 8 months 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 | « no previous file | tests/lib/async/future_foreach_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/future.dart
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index ea999b1299dcb07c4e0c657529b4218960534194..0fceb545e4ad63e77e930175e6fe72ca240b99ab 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -451,7 +451,7 @@ abstract class Future<T> {
return doWhile(() {
if (!iterator.moveNext()) return false;
var result = f(iterator.current);
- if (result is Future<T>) return result.then(_kTrue);
+ if (result is Future) return result.then(_kTrue);
return true;
});
}
« no previous file with comments | « no previous file | tests/lib/async/future_foreach_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698