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

Unified Diff: lib/src/delegate/future.dart

Issue 1841223002: Fix most strong mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Code review changes Created 4 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 | « lib/src/cancelable_operation.dart ('k') | lib/src/result.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/delegate/future.dart
diff --git a/lib/src/delegate/future.dart b/lib/src/delegate/future.dart
index 5e84e4f626b9cda386021777ab189f96edf70fae..bfc075b794d09eda0c35f38a862cedc60090fc18 100644
--- a/lib/src/delegate/future.dart
+++ b/lib/src/delegate/future.dart
@@ -7,20 +7,20 @@ import 'dart:async';
/// A wrapper that forwards calls to a [Future].
class DelegatingFuture<T> implements Future<T> {
/// The wrapped [Future].
- final Future _future;
+ final Future<T> _future;
DelegatingFuture(this._future);
Stream<T> asStream() => _future.asStream();
- Future catchError(Function onError, {bool test(error)}) =>
+ Future catchError(Function onError, {bool test(Object error)}) =>
_future.catchError(onError, test: test);
- Future then(onValue(T value), {Function onError}) =>
+ Future/*<S>*/ then/*<S>*/(/*=S*/ onValue(T value), {Function onError}) =>
_future.then(onValue, onError: onError);
Future<T> whenComplete(action()) => _future.whenComplete(action);
- Future timeout(Duration timeLimit, {void onTimeout()}) =>
+ Future<T> timeout(Duration timeLimit, {void onTimeout()}) =>
_future.timeout(timeLimit, onTimeout: onTimeout);
}
« no previous file with comments | « lib/src/cancelable_operation.dart ('k') | lib/src/result.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698