mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
fixes #4013
This commit is contained in:
parent
9822043ca4
commit
17ed440f2e
@ -376,6 +376,7 @@ class AtomicMethodCallAnalyzer extends CallAnalyzer
|
||||
$mixin_class_storage = $codebase->classlike_storage_provider->get($mixin->value);
|
||||
|
||||
$fq_class_name = $mixin_class_storage->name;
|
||||
$mixin_class_storage->mixin_declaring_fqcln = $class_storage->mixin_declaring_fqcln;
|
||||
$class_storage = $mixin_class_storage;
|
||||
$naive_method_exists = true;
|
||||
$method_id = $new_method_id;
|
||||
|
@ -533,6 +533,38 @@ class MixinAnnotationTest extends TestCase
|
||||
return (new FooGrandChild)->other();
|
||||
}'
|
||||
],
|
||||
'multipleMixinsWithSameMethod' => [
|
||||
'<?php
|
||||
|
||||
class Mix1
|
||||
{
|
||||
public function foo(): string
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class Mix2
|
||||
{
|
||||
public function foo(): string
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @mixin Mix1
|
||||
* @mixin Mix2
|
||||
*/
|
||||
class Bar
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$bar = new Bar();
|
||||
|
||||
$bar->foo();'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user