mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Avoid false-positives while analysing memoised coalesce
This commit is contained in:
parent
fd7afc9c40
commit
a93eb0eab4
@ -35,7 +35,10 @@ class CoalesceAnalyzer
|
|||||||
) {
|
) {
|
||||||
$left_var_id = '$<tmp coalesce var>' . (int) $left_expr->getAttribute('startFilePos');
|
$left_var_id = '$<tmp coalesce var>' . (int) $left_expr->getAttribute('startFilePos');
|
||||||
|
|
||||||
ExpressionAnalyzer::analyze($statements_analyzer, $left_expr, clone $context);
|
$cloned = clone $context;
|
||||||
|
$cloned->inside_isset = true;
|
||||||
|
|
||||||
|
ExpressionAnalyzer::analyze($statements_analyzer, $left_expr, $cloned);
|
||||||
|
|
||||||
$condition_type = $statements_analyzer->node_data->getType($left_expr) ?: Type::getMixed();
|
$condition_type = $statements_analyzer->node_data->getType($left_expr) ?: Type::getMixed();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user