Rule Req: recommend using a base type instead of var when LUB applies #57606
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
I would like to get a lint warning/hint for ternary operators when encountering code like this:
See #30079 (comment) for more info on motivation.
I'd like to see a lint warning on the
var
beforeshouldBeOfTypeBaseClass
pointing out that the type ofshouldBeOfTypeBaseClass
will be inferred as Object and you should specify a base class type instead of using var.The text was updated successfully, but these errors were encountered: