When in an if that checks a nullable typed property, a following if attempting to call a method on it will fail even though we know the type is not null.
Removing the instanceof check makes it work, but that shouldn't have any effect in this case since they're all public properties.
https://psalm.dev/r/6b7253ee73
```php
value */
if ($v->value) {
/** @psalm-trace $v->value */
if ($v instanceof B && 'yay' === $v->value->yay()) {
echo 'yay';
}
}
}
```
```
Psalm output (using commit 16b24bd):
ERROR: PossiblyNullReference - 25:53 - Cannot call method yay on possibly null value
INFO: Trace - 25:9 - $v->value: C
INFO: Trace - 23:5 - $v->value: C|null
ERROR: MissingConstructor - 4:12 - A has an uninitialized property A::$value, but no constructor
ERROR: MissingConstructor - 4:12 - B has an uninitialized property A::$value, but no constructor
```
https://psalm.dev/r/6b7253ee73
When in an if that checks a nullable typed property, a following if attempting to call a method on it will fail even though we know the type is not null.
Removing the
instanceof
check makes it work, but that shouldn't have any effect in this case since they're all public properties.