Commit graph

4 commits

Author SHA1 Message Date
Timothy Flynn
2b19d1b5ab LibJS: Do not coerce nullish references to unresolvable references
These are not strictly unresolvable references. Treating them as such
fails an assertion in the `delete UnaryExpression` semantic (which is
Reference::delete_ in our implementation) - we enter the unresolvable,
branch, which then asserts that the [[Strict]] slot of the reference is
false.
2023-07-06 21:36:13 +01:00
Linus Groh
5ee1758f46 LibJS: Use ToPropertyKey AO for computed member expression value
This ensures the value goes through the regular ToPrimitive mechanism,
which PropertyKey::from_value() bypasses. This is relevant for objects
with a @@toPrimitive method, for example.
Also enables one skipped test in delete-basic.js, which now passes.
2022-12-10 01:08:34 +00:00
Luke Wilde
bd809b7787 LibJS: Add more delete operator tests 2022-03-28 14:05:33 +02:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Renamed from Libraries/LibJS/Tests/operators/delete-basic.js (Browse further)