Skip to content

Library: async: extra error is seen in checked mode by onError callback of runZoned #14436

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


There is a difference in behavior between production and checked modes on the test

co19/src/LibTest/async/Future/catchError_A03_t05

f() {
  new Future.error(1).catchError((x,y,z){});
}

main() {
  asyncStart();
  runZoned(f, onError: (e) {
    asyncEnd();
  });
}

In production mode, one error event happens for callback's function type mismatch (three parameters are not supported).

In checked mode, two error event happen, first for callback's function type mismatch, second for error object '1'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.closed-invalidClosed as we don't believe the reported issue is generally actionablelibrary-async

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions