Dart analyzer not analyzing correct after If(variable case class) #56914
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
triage-automation
See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Dart version and tooling diagnostic info (
dart info
)Whether you are using Windows, macOS, or Linux - macOS
Whether you are using Chrome, Safari, Firefox, Edge - doesn't matter
Hello Dart team!
I have a problem, I searched the probably existing issues, but didn't find anything relating to this issue.
So, consider example, we have a sealed class with child classes like in screenshot below:
And if we will write code like this:
Dart analyzer will warn us that
testor
isA
, not B after checking pattern.The text was updated successfully, but these errors were encountered: