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
The correct semantics are explained for example here for || and here for &&, but in essence, the operators always yield the value of one of the two input expressions, so probably the resulting type should simply be the union of the two inputs.
The text was updated successfully, but these errors were encountered:
Sorry sir,
I forgot my github account so i was not able to reply your message and your valuable time.
let a = 0 || "foobar";
console.log(a); // "foobar"
let b = "" && 42;
console.log(b); // ""
I'm new to open source contributions but I'm well versed with C++, HTML, CSS, Javascript, React, and Node.js.
could you please tell me how to get started.
thank you.
The AbstractInterpreter currently assumes that the result of binary logical operators is a .boolean. While that probably seems intuitive, that's not how JavaScript works:
The correct semantics are explained for example here for
||
and here for&&
, but in essence, the operators always yield the value of one of the two input expressions, so probably the resulting type should simply be the union of the two inputs.The text was updated successfully, but these errors were encountered: