Fix type of onError. (#1339)

The function passed to Stream.handleError needs to accept either a
single argument of type `Object`, or an `Object` and a `StackTrace`.
Since this can't be expressed by the type system, it's checked at
runtime.  As a result, the `check` function (as previously written)
would fail if ever instantiated with a type `T` that was narrower than

Prior to implementation of (improved inference
for fold etc.), this worked fine, because type inference always
supplied an argument type of `dynamic` or `Object` for the function
literals passed to `check`.  However, with the inference improvement
enabled, it starts to infer other types, causing runtime failures.

The correct fix is to give the `event` argument of `onError` an
appropriate type.
1 file changed
tree: 3f44e78913849baf008dfe4079d36aa98b579668
  1. Language/
  2. LanguageFeatures/
  3. LibTest/
  4. Utils/
  6. codereview.settings

co19 - Dart language and library conformance test suite

This repository contains conformance tests for Dart language and Dart runtime libraries

Files in this test suite are only considered tests if their filenames match the regexp r"t[0-9]{2}.dart$"