False positive prefer_const_constructors_in_immutables with enum comparison in assert #58360
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-false-positive
linter-set-flutter
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
The following code triggers
prefer_const_constructors_in_immutables
onA
constructor but it shouldn't as enum comparisons are not yet allowed in asserts.It looks related to const evaluation as there's no analyzer error on the constructor if we make the constructor const though there's an error on the constructor invocation.
Filed also #45441
/cc @scheglov @bwilkerson
The text was updated successfully, but these errors were encountered: