In above code psalm outputs a PossiblyNullReference while the previous case already did an instance check. On the other hand, if you add another instanceof check before the code psalm complains about, it outputs RedundantCondition, because the check was already done in the previous case (https://psalm.dev/r/3fe38f56be).
Expected behavior imo: psalm does not output a PossiblyNullReference when an instanceof check has already been done in a previous case containing a break statement.
https://psalm.dev/r/df14918297
In above code psalm outputs a PossiblyNullReference while the previous case already did an instance check. On the other hand, if you add another instanceof check before the code psalm complains about, it outputs RedundantCondition, because the check was already done in the previous case (https://psalm.dev/r/3fe38f56be).
Expected behavior imo: psalm does not output a PossiblyNullReference when an instanceof check has already been done in a previous case containing a break statement.