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

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

Issue 1958143002: Fix return-type for error-handlers in streams. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Explain 'dynamic' in comment. Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream_impl.dart
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index dffaa1205910b222ea7ca6bbdbf197069f33cccd..8c9af64bb9e01fd4bfe9511e9024117bcce3e8e8 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -145,7 +145,9 @@ class _BufferingStreamSubscription<T> implements StreamSubscription<T>,
void onError(Function handleError) {
if (handleError == null) handleError = _nullErrorHandler;
- _onError = _registerErrorHandler/*<T>*/(handleError, _zone);
+ // We are not allowed to use 'void' as type argument for the generic type,
+ // so we use 'dynamic' instead.
+ _onError = _registerErrorHandler/*<dynamic>*/(handleError, _zone);
}
void onDone(void handleDone()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698