1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

return null when expression can't be stored as unresolved

This commit is contained in:
orklah 2021-10-10 09:28:19 +02:00
parent e7a86148b0
commit da4a0fe9a9

View File

@ -203,6 +203,10 @@ class ExpressionResolver
$parent_fq_class_name $parent_fq_class_name
); );
if (!$right) {
return null;
}
return new UnresolvedConstant\UnresolvedAdditionOp( return new UnresolvedConstant\UnresolvedAdditionOp(
new UnresolvedConstant\ScalarValue(0), new UnresolvedConstant\ScalarValue(0),
$right $right
@ -217,6 +221,10 @@ class ExpressionResolver
$parent_fq_class_name $parent_fq_class_name
); );
if (!$right) {
return null;
}
return new UnresolvedConstant\UnresolvedSubtractionOp( return new UnresolvedConstant\UnresolvedSubtractionOp(
new UnresolvedConstant\ScalarValue(0), new UnresolvedConstant\ScalarValue(0),
$right $right