1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00

Resolve fail test #10807

Resolved problem:
```
Psalm\Tests\AssertAnnotationTest::testAssertsAllongCallStaticMethodWork
Psalm\Exception\CodeException: LessSpecificReturnStatement
The type 'string' is more general than the declared return type 'non-empty-string' for returnNonEmpty
```
This commit is contained in:
Ivan Sidorov 2024-03-11 18:48:38 +00:00 committed by Bruce Weirdan
parent 2a91bd6616
commit fe42e8821d
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -789,7 +789,7 @@ final class AtomicStaticCallAnalyzer
} }
} }
if (!$callstatic_method_exists || $class_storage->hasSealedMethods($config)) { if ($naive_method_exists || !$callstatic_method_exists || $class_storage->hasSealedMethods($config)) {
$does_method_exist = MethodAnalyzer::checkMethodExists( $does_method_exist = MethodAnalyzer::checkMethodExists(
$codebase, $codebase,
$method_id, $method_id,