ladybird/Userland/Libraries/LibJS/Tests/loops
Linus Groh 2172e51246 LibJS: Implicitly break for..in loop if the RHS result is nullish
This implements the missing step 6a of 14.7.5.6 ForIn/OfHeadEvaluation:

    a. If exprValue is undefined or null, then
        i. Return Completion { [[Type]]: break, [[Value]]: empty, [[Target]]: empty }.

In other words, this should just do nothing instead of throwing during
the undefined to object coercion:

    for (const x in undefined);
2021-04-10 21:00:04 +02:00
..
break-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
continue-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
do-while-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
for-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
for-head-errors.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
for-in-basic.js LibJS: Implicitly break for..in loop if the RHS result is nullish 2021-04-10 21:00:04 +02:00
for-no-curlies.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
for-of-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
for-scopes.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
while-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00