mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Avoid false-positives while analysing memoised coalesce
This commit is contained in:
parent
394eceb01c
commit
f0876b86f4
@ -35,7 +35,10 @@ class CoalesceAnalyzer
|
||||
) {
|
||||
$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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user