ladybird/Userland/Libraries/LibJS/Tests/loops
Shannon Booth 30ab198b40 LibJS: Create const variables in ForIn/OfBodyEvaluation in strict mode
Our implementation of environment.CreateImmutableBinding(name, true)
in this AO was not correctly initializing const variables in strict
mode. This would mean that constant declarations in for loop bodies
would not throw if they were modified.

To fix this, add a new parameter to CreateVariable to set strict mode.
Also remove the vm.is_strict mode check here, as it doesn't look like
anywhere in the spec will change strict mode depending on whether the
script itself is running in script mode or not.

This fixes two of our test-js tests, no change to test262.
2023-09-21 16:19:05 +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-await-of.js LibJS: Call resolve instead of reject in AsyncFromSyncIteratorPrototype 2022-09-02 02:07:37 +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: Create const variables in ForIn/OfBodyEvaluation in strict mode 2023-09-21 16:19:05 +02:00
for-no-curlies.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
for-of-basic.js LibJS: Create const variables in ForIn/OfBodyEvaluation in strict mode 2023-09-21 16:19:05 +02: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