You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e0612d8
Browse filesBrowse the repository at this point in the historyBrowse files
Use genuine falsey narrowing (not the inverted truthy narrowing) for the consequent of BooleanAnd false-context conditional holders
- In `BooleanAndHandler::specifyTypes()` false context, split the per-arm
narrowings used to build conditional expression holders into a condition
(antecedent) set and a holder (consequent) set.
- The truthy-narrowing-swap fallback (added for `isset()` on array dim fetches)
is now only applied to the antecedent set. `processBooleanConditionalTypes`
inverts that set back to the truthy narrowing, so the swap is sound there.
- The consequent set keeps the genuine falsey narrowing of each arm (including
the mixed truthy-and-false re-derivation). When an arm has no sound falsey
narrowing it contributes no consequent, instead of fabricating one by
inverting its truthy narrowing.
- This fixes over-narrowing where `$a !== null && $b === $a` falling through and
then re-testing `$a !== null` wrongly narrowed `$b` to `null`: inverting the
`===` truthy narrowing (`$b` to `$a`'s broad `string`) removed `string` from
`$b`. The same fault affected every comparison value type (int/string) and
both variables and property fetches; all are fixed by the single change.
- The `BooleanOr` truthy path does not use the swap and was already correct.
0 commit comments