Samsung/escargot

Missed short-circuiting

marccarigiet opened this issue · 2 comments

describe the Bug
Expressions of the form: (expression evaluating to false ) && exp1 | exp2, don't short circuit,

Test case

function throwError() {
    throw new Error();
}
false && true | throwError()

Or in a smaller case:

false && true | var1 

backtrace
Uncaught Error:
biggercase.js (3:11)
biggercase.js (5:17)

and respectively

Uncaught ReferenceError: var1 is not defined:
trigger.js (1:17)

Expected behaviorNo error should be thrown, as the && operator should short-circuit and the parts of the expression throwing an error should not be evaluated.

Thank you for your bug report

Fixed by #1251