1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Only set if non-null

This commit is contained in:
Brown 2020-01-14 17:03:58 -05:00
parent adc658901a
commit 3fd70a9c88

View File

@ -941,7 +941,9 @@ class FunctionCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expressio
$context
);
$statements_analyzer->node_data->setType($stmt, $const_type);
if ($const_type) {
$statements_analyzer->node_data->setType($stmt, $const_type);
}
}
} else {
$context->check_consts = false;