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

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

Issue 2954383002: Relax typing on Stream.transform
Patch Set: Created 3 years, 6 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 | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | no next file » | 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 3d58455d0ed101bb3ed31eb177524cf912d3e4f4..feef93c5e23ddef62fcd0a18cd5e5379af5d01c8 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -615,8 +615,8 @@ abstract class Stream<T> {
* and which elements it will contain,
* is entirely up to the transformation.
*/
- Stream<S> transform<S>(StreamTransformer<T, S> streamTransformer) {
- return streamTransformer.bind(this);
+ Stream<S> transform<S>(StreamTransformer<dynamic, S> streamTransformer) {
+ return streamTransformer.bind(this.map<T>((x) => x));
vsm 2017/06/26 18:28:51 Actually, not sure the map is necessary at this po
Lasse Reichstein Nielsen 2017/06/27 05:45:18 It should work, the transformer claims to handle a
}
/**
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698