@@ -1611,35 +1611,38 @@ private function resolveType(string $exprString, Expr $node): Type
16111611}
16121612
16131613if  ($ nodeinstanceof  Expr \Ternary) {
1614+ $ noopCallbackstatic  function  (): void  {
1615+ };
1616+ $ condResult$ this nodeScopeResolver ->processExprNode ($ nodecond , $ this $ noopCallbackcreateDeep ());
16141617if  ($ nodeif  === null ) {
16151618$ conditionType$ this getType ($ nodecond );
16161619$ booleanConditionType$ conditionTypetoBoolean ();
16171620if  ($ booleanConditionTypeisTrue ()->yes ()) {
1618- return  $ this -> filterByTruthyValue ( $ node -> cond )->getType ($ nodecond );
1621+ return  $ condResult -> getTruthyScope ( )->getType ($ nodecond );
16191622}
16201623
16211624if  ($ booleanConditionTypeisFalse ()->yes ()) {
1622- return  $ this -> filterByFalseyValue ( $ node -> cond )->getType ($ nodeelse );
1625+ return  $ condResult -> getFalseyScope ( )->getType ($ nodeelse );
16231626}
16241627
16251628return  TypeCombinator::union (
1626- TypeCombinator::removeFalsey ($ this -> filterByTruthyValue ( $ node -> cond )->getType ($ nodecond )),
1627- $ this -> filterByFalseyValue ( $ node -> cond )->getType ($ nodeelse ),
1629+ TypeCombinator::removeFalsey ($ condResult -> getTruthyScope ( )->getType ($ nodecond )),
1630+ $ condResult -> getFalseyScope ( )->getType ($ nodeelse ),
16281631);
16291632}
16301633
16311634$ booleanConditionType$ this getType ($ nodecond )->toBoolean ();
16321635if  ($ booleanConditionTypeisTrue ()->yes ()) {
1633- return  $ this -> filterByTruthyValue ( $ node -> cond )->getType ($ nodeif );
1636+ return  $ condResult -> getTruthyScope ( )->getType ($ nodeif );
16341637}
16351638
16361639if  ($ booleanConditionTypeisFalse ()->yes ()) {
1637- return  $ this -> filterByFalseyValue ( $ node -> cond )->getType ($ nodeelse );
1640+ return  $ condResult -> getFalseyScope ( )->getType ($ nodeelse );
16381641}
16391642
16401643return  TypeCombinator::union (
1641- $ this -> filterByTruthyValue ( $ node -> cond )->getType ($ nodeif ),
1642- $ this -> filterByFalseyValue ( $ node -> cond )->getType ($ nodeelse ),
1644+ $ condResult -> getTruthyScope ( )->getType ($ nodeif ),
1645+ $ condResult -> getFalseyScope ( )->getType ($ nodeelse ),
16431646);
16441647}
16451648
0 commit comments