AnthonyANI Thank you for the test case; you are absolutely right, but -
We're - by purpose - less strict in this case because it is a common practice to poorly annotate types (sadly even in large PHP frameworks).
In this case, the type inferring engine deliberately checks for type inheritance and suppresses warnings in case the type is a subclass or superclass of the target type.
I'm keen to improve this behavior - I'm thinking about a more specific setting, something like analysis-strictness or a separate diagnostic code for this kind of diagnostic (?).
What do you think, @AnthonyANI?