Skip to content

Using .call on a known function type should not be a dynamic call #26812

Closed
@leafpetersen

Description

@leafpetersen

This code:

void f(int x) => print(x);
void main() {
  f.call("hello");
}

gets no errors or warnings in strong mode. Since we know the type of f, which should treat this as a regular call, and issue an error.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions