mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
parent
b775d297bb
commit
86f503ab82
@ -435,6 +435,12 @@ final class MissingMethodCallHandler
|
||||
}
|
||||
|
||||
$ancestors = $static_class_storage->class_implements;
|
||||
foreach ($static_class_storage->namedMixins as $namedObject) {
|
||||
$type = $namedObject->value;
|
||||
if ($type) {
|
||||
$ancestors[$type] = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($ancestors as $fq_class_name => $_) {
|
||||
$class_storage = $codebase->classlikes->getStorageFor($fq_class_name);
|
||||
|
@ -596,6 +596,28 @@ class MixinAnnotationTest extends TestCase
|
||||
'$g' => 'list<FooModel>',
|
||||
],
|
||||
],
|
||||
'mixinInheritMagicMethods' => [
|
||||
'code' => '<?php
|
||||
/**
|
||||
* @method $this active()
|
||||
*/
|
||||
class A {
|
||||
public function __call(string $name, array $arguments) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @mixin A
|
||||
*/
|
||||
class B {
|
||||
public function __call(string $name, array $arguments) {}
|
||||
}
|
||||
|
||||
$b = new B;
|
||||
$c = $b->active();',
|
||||
'assertions' => [
|
||||
'$c' => 'B',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user