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

Unified Diff: lib/src/stream_sink_transformer/handler_transformer.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/stream_sink_completer.dart ('k') | lib/src/stream_splitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/stream_sink_transformer/handler_transformer.dart
diff --git a/lib/src/stream_sink_transformer/handler_transformer.dart b/lib/src/stream_sink_transformer/handler_transformer.dart
index a20a3fa18b08e4117cc9d18d65f331f802899e91..8cc3d011ecbdafd01efd92e7fe40b256bdbd1407 100644
--- a/lib/src/stream_sink_transformer/handler_transformer.dart
+++ b/lib/src/stream_sink_transformer/handler_transformer.dart
@@ -54,11 +54,7 @@ class _HandlerSink<S, T> implements StreamSink<S> {
void add(S event) {
if (_transformer._handleData == null) {
- // [event] is an S and [_inner.add] takes a T. This style of conversion
- // will throw an error in checked mode if [_inner] is actually a
- // [StreamSink<T>], but will work if [_inner] isn't reified and won't add
- // an extra check in unchecked mode.
- _inner.add(event as dynamic);
+ _inner.add(event as T);
} else {
_transformer._handleData(event, _safeCloseInner);
}
« no previous file with comments | « lib/src/stream_sink_completer.dart ('k') | lib/src/stream_splitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698