False positive and maybe-false negative with cascade_invocations with cascaded invocations on difference references #58662
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
linter-false-negative
linter-false-positive
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Describe the issue
False positive with
cascade_invocations
on different references.Also, a bonus maybe-false negative with uncascaded invocations on equal references, if allowed to assume that the getter's return value doesn't change.
To Reproduce
Expected behavior
No lint (although in this very specific example, a lint about
abs
andceil
having no side effects would be reasonable).Additional context
The linter seems to think
a.something
andb.something
are the same object, which is not in general even likely to be true.The text was updated successfully, but these errors were encountered: