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

Unified Diff: corelib/src/implementation/future_implementation.dart

Issue 9627002: future: fix future.immediate allocator (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/implementation/future_implementation.dart
diff --git a/corelib/src/implementation/future_implementation.dart b/corelib/src/implementation/future_implementation.dart
index ecf25cde3f87336c6c85e8a7500513543333c37b..f2d73a337f7563922bd62c5f186fd6634a5471c3 100644
--- a/corelib/src/implementation/future_implementation.dart
+++ b/corelib/src/implementation/future_implementation.dart
@@ -36,8 +36,10 @@ class FutureImpl<T> implements Future<T> {
_exceptionHandled = false;
}
- FutureImpl.immediate(T value) : this() {
- _setValue(value);
+ factory FutureImpl.immediate(T value) {
+ final res = new FutureImpl();
+ res._setValue(value);
+ return res;
}
T get value() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698