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

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
Index: sdk/lib/async/future_impl.dart
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 980f0caa4f4a724827b30d5fea32845e7961392e..fcfb341f2618597780031a2698407d655f54af59 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -625,9 +625,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, () {

Powered by Google App Engine
This is Rietveld 408576698