Open
Description
For example, if the compiler knows for a fact that a given set of numbers can only ever be positive or 0, and multiple bounds checks are being performed, the following is possible:
/**
* @param {Array} a
* @param {Array} b
*/
function test(a, b) {
return a.length === 0 && b.length === 0;
}
->
function test(a, b) {
return a.length + b.length === 0;
}