False-positive unnecessary_cast
when making a type nullable.
#53828
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P1
A high priority bug; for example, a single project is unusable or has many test failures
Describe the issue
Linter gives
unnecessary_cast
despite the cast fixing a type error.To Reproduce
Expected behavior
No lint message, as the cast is not unnecessary.
Additional context
Applying the lint fix as suggested causes a type error and dart refuses to compile.
The text was updated successfully, but these errors were encountered: