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

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

Issue 1815583002: Add generic annotations to more SDK APIs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove generic type from _Future.then 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 | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/collection/set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream.dart
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index b69c6fc39e9813dbbde2ea40b90a7927ae080993..89565e169d280b383cf159b2766b32c32be0555b 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -532,7 +532,7 @@ abstract class Stream<T> {
* If a broadcast stream is listened to more than once, each subscription
* will individually call `convert` and expand the events.
*/
- Stream/*<S>*/ expand(Iterable/*<S>*/ convert(T value)) {
+ Stream/*<S>*/ expand/*<S>*/(Iterable/*<S>*/ convert(T value)) {
return new _ExpandStream<T, dynamic/*=S*/>(this, convert);
}
@@ -566,7 +566,8 @@ abstract class Stream<T> {
* The `streamTransformer` can decide whether it wants to return a
* broadcast stream or not.
*/
- Stream transform(StreamTransformer<T, dynamic> streamTransformer) {
+ Stream/*<S>*/ transform/*<S>*/(
+ StreamTransformer<T, dynamic/*=S*/ > streamTransformer) {
return streamTransformer.bind(this);
}
@@ -1696,7 +1697,7 @@ abstract class StreamTransformer<S, T> {
*/
const factory StreamTransformer(
StreamSubscription<T> transformer(Stream<S> stream, bool cancelOnError))
- = _StreamSubscriptionTransformer;
+ = _StreamSubscriptionTransformer<S, T>;
/**
* Creates a [StreamTransformer] that delegates events to the given functions.
@@ -1713,7 +1714,7 @@ abstract class StreamTransformer<S, T> {
void handleData(S data, EventSink<T> sink),
void handleError(Object error, StackTrace stackTrace, EventSink<T> sink),
void handleDone(EventSink<T> sink)})
- = _StreamHandlerTransformer;
+ = _StreamHandlerTransformer<S, T>;
/**
* Transform the incoming [stream]'s events.
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/collection/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698