Request for lint: unnecessary_dynamic #58082
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
devexp-linter
Issues with the analyzer's support for the linter package
linter-lint-request
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
How about a lint that fires when you write
dynamic
for a parameter type butObject
would have worked?e.g.
I see this pretty frequently and I think it hides a misunderstanding about what
dynamic
is useful for, i.e. for the rare cases when you want to turn off static checking and always do dynamic dispatch.Happy to take a shot at implementing this if you think it makes sense, particularly if you can give hints about how to figure out whether dynamic dispatch was used :)
Thanks!
The text was updated successfully, but these errors were encountered: