Skip to content

Analyzer should detect if improperly typed handler passed to Future.catchError. #35825

Closed
@stereotype441

Description

@stereotype441

Due to the fact that Future.catchError supports two kinds of callbacks, its callback parameter is typed Function, which means it gets very limited type checking from the analyzer.

Since this is a commonly used core method, it would be nice if the analyzer had some special case logic to type check it. I'm not sure whether it should be a hint or a lint (@bwilkerson, @pq, WDYT?)

Related issues: #35812, #34144, #31939, #35545.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ondevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions