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

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

Issue 1299443002: Make generic type of timeout-future the same as the one from the original. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comment. Created 4 years, 10 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 | « sdk/lib/async/future.dart ('k') | tests/lib/async/future_timeout_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/future_impl.dart
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 68dbbc041e7f49408f1edec2aa481a3cf0805d93..ad72431842b63c20eec4387842c86a1236b2601a 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -680,9 +680,9 @@ class _Future<T> implements Future<T> {
}
}
- Future timeout(Duration timeLimit, {onTimeout()}) {
+ Future<T> timeout(Duration timeLimit, {onTimeout()}) {
if (_isComplete) return new _Future.immediate(this);
- _Future result = new _Future();
+ _Future result = new _Future<T>();
Timer timer;
if (onTimeout == null) {
timer = new Timer(timeLimit, () {
« no previous file with comments | « sdk/lib/async/future.dart ('k') | tests/lib/async/future_timeout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698