mirror of
https://github.com/danog/psalm.git
synced 2024-12-12 09:19:40 +01:00
qa: use $assertion_var_id
over $arg_var_id
for better type reflection
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
parent
6c1ed90dc1
commit
e13268f5c0
@ -793,8 +793,8 @@ class CallAnalyzer
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (isset($arg_var_id) && isset($context->vars_in_scope[$arg_var_id])) {
|
} elseif (isset($context->vars_in_scope[$assertion_var_id])) {
|
||||||
$other_type = $context->vars_in_scope[$arg_var_id];
|
$other_type = $context->vars_in_scope[$assertion_var_id];
|
||||||
if (self::isNewTypeNarrowingDownOldType($other_type, $union)) {
|
if (self::isNewTypeNarrowingDownOldType($other_type, $union)) {
|
||||||
foreach ($union->getAtomicTypes() as $atomic_type) {
|
foreach ($union->getAtomicTypes() as $atomic_type) {
|
||||||
if ($assertion_type instanceof TTemplateParam
|
if ($assertion_type instanceof TTemplateParam
|
||||||
|
Loading…
Reference in New Issue
Block a user