mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix static calls on class_aliased classes
This commit is contained in:
parent
947e3bf0f1
commit
fab4d135b2
@ -315,6 +315,8 @@ class StaticCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
|
||||
|
||||
$fq_class_name = $lhs_type_part->value;
|
||||
|
||||
$fq_class_name = $codebase->classlikes->getUnAliasedName($fq_class_name);
|
||||
|
||||
$is_mock = ExpressionAnalyzer::isMock($fq_class_name);
|
||||
|
||||
$has_mock = $has_mock || $is_mock;
|
||||
|
@ -371,6 +371,9 @@ class StubTest extends TestCase
|
||||
|
||||
$d = new D();
|
||||
|
||||
D::bat();
|
||||
$d::bat();
|
||||
|
||||
class E implements IAlias {}'
|
||||
);
|
||||
|
||||
|
@ -11,6 +11,8 @@ class A {
|
||||
public function bar(string $s) : string {
|
||||
return $s . " I’m here";
|
||||
}
|
||||
|
||||
public static function bat() : void {}
|
||||
}
|
||||
|
||||
interface I {}
|
||||
|
Loading…
Reference in New Issue
Block a user