Skip to content

DDC missing error on forEach invocation #29705

Closed
@vsmenon

Description

@vsmenon

The following results in a runtime error in checked mode (bar is invoked with no args). In DDC, there is no runtime error. bar is incorrectly called with one arg.

void foo() {
  print('foo');
}

void bar(int x) {
  print('bar $x');
}

List list = <dynamic>[ foo, bar ];

void main() {
  list.forEach((void init()) => init());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    soundnesstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions