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
[TS] Truthiness idiom: extend ToBoolean to all operand kinds
The differential oracle immediately caught the second half of the hole:
with the ref-only reading, `if (a)` over a numeric NaN still took the
then-branch (`NaN != 0` is true, yet NaN is falsy), so
andOfUnknown(NaN, x) returned 0 where JS returns 11. The idiom now
resolves via mkTruthyExpr for every operand kind (bool/fp/ref/fake), and
only for `!=` — front ends never lower truthiness through `==` (negated
tests swap branch successors instead), so `==` keeps the literal
loose-equality semantics.
0 commit comments