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
continue-basic.js
do-while-basic.js
for-await-of.js LibJS: Call resolve instead of reject in AsyncFromSyncIteratorPrototype 2022-09-02 02:07:37 +01:00
for-basic.js
for-head-errors.js
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
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
while-basic.js