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:
parent
e7a86148b0
commit
da4a0fe9a9
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user