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

Unified Diff: tool/input_sdk/lib/async/stream.dart

Issue 1554683002: Update to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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 | « tool/input_sdk/lib/async/future_impl.dart ('k') | tool/input_sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/lib/async/stream.dart
diff --git a/tool/input_sdk/lib/async/stream.dart b/tool/input_sdk/lib/async/stream.dart
index f81667776f0e099634de363d85370fce6c799da2..c4c2c07fa89db5e559ac7ee9da8e67f023289e08 100644
--- a/tool/input_sdk/lib/async/stream.dart
+++ b/tool/input_sdk/lib/async/stream.dart
@@ -296,8 +296,8 @@ abstract class Stream<T> {
* If a broadcast stream is listened to more than once, each subscription
* will individually execute `map` for each event.
*/
- Stream map(convert(T event)) {
- return new _MapStream<T, dynamic>(this, convert);
+ Stream/*<S>*/ map/*<S>*/(/*=S*/ convert(T event)) {
+ return new _MapStream<T, dynamic/*=S*/>(this, convert);
}
/**
@@ -458,8 +458,8 @@ 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 expand(Iterable convert(T value)) {
- return new _ExpandStream<T, dynamic>(this, convert);
+ Stream/*<S>*/ expand/*<S>*/(Iterable/*<S>*/ convert(T value)) {
+ return new _ExpandStream<T, dynamic/*=S*/>(this, convert);
}
/**
@@ -523,8 +523,9 @@ abstract class Stream<T> {
}
/** Reduces a sequence of values by repeatedly applying [combine]. */
- Future fold(var initialValue, combine(var previous, T element)) {
- _Future result = new _Future();
+ Future/*<S>*/ fold/*<S>*/(var/*=S*/ initialValue,
+ /*=S*/ combine(var/*=S*/ previous, T element)) {
+ _Future/*<S>*/ result = new _Future();
var value = initialValue;
StreamSubscription subscription;
subscription = this.listen(
@@ -1568,7 +1569,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.
@@ -1585,7 +1586,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 | « tool/input_sdk/lib/async/future_impl.dart ('k') | tool/input_sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698