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

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

Issue 23793006: Handle Future result from Future.sync computation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: okay? Created 7 years, 3 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 | sdk/lib/async/future_impl.dart » ('j') | sdk/lib/async/future_impl.dart » ('J')
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 6b6c760dadb760119dcc4140a9ee492121fd5368..ab4b666965b2ebfedef5d92fdf948310fe408cb8 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -138,11 +138,11 @@ abstract class Future<T> {
* A future whose value is available in the next event-loop iteration.
*
* If [value] is not a [Future], using this constructor is equivalent
- * to [:new Future.sync(() => value):].
+ * to [:new Future<T>.sync(() => value):].
*
* See [Completer] to create a Future and complete it later.
*/
- factory Future.value([T value]) {
+ factory Future.value([value]) {
return new _Future<T>.immediate(value);
}
@@ -365,7 +365,7 @@ abstract class Future<T> {
*
* If you already have a Future, you probably don't need a Completer.
* Instead, you can usually use [Future.then], which returns a Future:
- *
+ *
* Future doStuff(){
* return someAsyncOperation().then((result) {
* // Do something.
« no previous file with comments | « no previous file | sdk/lib/async/future_impl.dart » ('j') | sdk/lib/async/future_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698