Index: sdk/lib/async/stream_impl.dart |
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart |
index 164d3b242802874e9d1d4e2cbffaeaf6438a3d68..9ae7342d65038f9e12ebb3be3f50742d8e0dfa18 100644 |
--- a/sdk/lib/async/stream_impl.dart |
+++ b/sdk/lib/async/stream_impl.dart |
@@ -343,13 +343,14 @@ class _BufferingStreamSubscription<T> |
// future to finish we must not report the error. |
if (_isCanceled && !_waitsForCancel) return; |
_state |= _STATE_IN_CALLBACK; |
+ // TODO(floitsch): this dynamic should be 'void'. |
if (_onError is ZoneBinaryCallback<dynamic, Object, StackTrace>) { |
ZoneBinaryCallback<dynamic, Object, StackTrace> errorCallback = _onError |
as Object/*=ZoneBinaryCallback<dynamic, Object, StackTrace>*/; |
_zone.runBinaryGuarded(errorCallback, error, stackTrace); |
} else { |
- _zone.runUnaryGuarded<dynamic, dynamic>( |
- _onError as Object/*=ZoneUnaryCallback<dynamic, dynamic>*/, error); |
+ _zone.runUnaryGuarded<dynamic, Object>( |
+ _onError as Object/*=ZoneUnaryCallback<dynamic, Object>*/, error); |
} |
_state &= ~_STATE_IN_CALLBACK; |
} |
@@ -401,7 +402,7 @@ class _BufferingStreamSubscription<T> |
* during the call, and it checks for state changes after the call |
* that should cause further callbacks. |
*/ |
- void _guardCallback(callback) { |
+ void _guardCallback(void callback()) { |
assert(!_inCallback); |
bool wasInputPaused = _isInputPaused; |
_state |= _STATE_IN_CALLBACK; |
@@ -551,10 +552,10 @@ typedef void _DataHandler<T>(T value); |
typedef void _DoneHandler(); |
/** Default data handler, does nothing. */ |
-void _nullDataHandler(var value) {} |
+void _nullDataHandler(Object value) {} |
/** Default error handler, reports the error to the current zone's handler. */ |
-void _nullErrorHandler(error, [StackTrace stackTrace]) { |
+void _nullErrorHandler(Object error, [StackTrace stackTrace]) { |
Zone.current.handleUncaughtError(error, stackTrace); |
} |