Bug report
phpstan does not correctly propagate type information if an assignment is involved in an instanceof test.
Code snippet that reproduces the problem
https://phpstan.org/r/63411238-7893-4c6e-b6ff-16b1f1f78700
Expected output
foo() correctly reports no errors, but has redundantly do the comparison $elt instanceof A. bar() and baz() report attempting to call an undefined method on A|U::getUser(), on a line that can only be executed if $elt instanceof A (which implements the method).