Skip to content

Lots of new strong-mode hints related to generic functions #25040

Closed
@zoechi

Description

@zoechi
'123-456'
    .split('-')
    .map((String t) => int.parse(t.trim()))
//       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    .toList()

Information:(92, 22) The argument type '(String) → T' cannot be assigned to the parameter type '(String) → int'

int val = 10;
math.min(100, val);

Information:(115, 22) The argument type 'int' cannot be assigned to the parameter type 'T'

I wasn't yet able to figure out how to apply generic type comments to satisfy these checks.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions