phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

Fix subtype check for identical late-resolvable conditional types (bug #10942)

Open yt-catpaw opened this issue 4 weeks ago • 0 comments

closes https://github.com/phpstan/phpstan/issues/10942

・Summary

Treat identical late-resolvable conditional types as compatible before resolving them. Short-circuit when the same conditional appears inside a union. Add regression test for bug #10942.

・Testing

vendor/bin/phpunit tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php --filter testBug10942

yt-catpaw avatar Nov 26 '25 16:11 yt-catpaw