language
language copied to clipboard
Flow analysis - keep non-nullability on join
Here ancestor
has initially type Element?
, so cannot be promoted to either ClassElement
or ExtensionElement
.
But it cannot be null
if any of them is true.
var ancestor = enclosingElement;
if (ancestor is ClassElement || ancestor is ExtensionElement) {
if (ancestor.hasDoNotStore) {
return true;
}
}