Bug report
Combining get_class and/or match arms with generics is giving incorrectly comparison results.
Code snippet that reproduces the problem
PHPStan Try Link
Expected output
The output should at least report that comparing with the class-string<TypeWithSpecific> is always false, instead of trying to compare with TypeWithSpecific directly. Not sure if that might be the source of the bug.
The match arm comparison should not be reported, as TypeWithSpecific is a possible result (and even the only result in this example) of the TypeWithGeneric<Generic> generic.
The second error Parameter #1 $type of method HelloWorld::call() expects TypeWithSpecific, TypeWithGeneric<Generic> given. that is being thrown will probably be fixed if the first error is correctly mitigated, I think.
Did PHPStan help you today? Did it make you happy in any way?
Always. None of this would have been possible 10 years ago, it is amazing that we can nitpick on such deep error reporting ;)