mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
Make clear that class string check for trait $this key only applies to certain assertions
This commit is contained in:
parent
4e81d0c5ab
commit
63f3460df7
@ -482,7 +482,7 @@ class AssertionReconciler extends Reconciler
|
|||||||
&& !$new_type_has_interface
|
&& !$new_type_has_interface
|
||||||
&& (!($statements_analyzer->getSource()->getSource() instanceof TraitAnalyzer)
|
&& (!($statements_analyzer->getSource()->getSource() instanceof TraitAnalyzer)
|
||||||
|| ($key !== '$this'
|
|| ($key !== '$this'
|
||||||
&& !($existing_var_type->hasLiteralClassString() && $new_type->hasLiteralClassString())))
|
&& strpos($original_assertion, 'isa-') !== 0))
|
||||||
&& UnionTypeComparator::isContainedBy(
|
&& UnionTypeComparator::isContainedBy(
|
||||||
$codebase,
|
$codebase,
|
||||||
$existing_var_type,
|
$existing_var_type,
|
||||||
|
Loading…
Reference in New Issue
Block a user