diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-03 01:25:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-03 01:30:30 +0200 |
commit | e8430cf0d31afbbf6c6f3632697e262351b2182e (patch) | |
tree | 80c4e1aae9ab2b67dfb815e03ea245982213756c /Userland/Libraries/LibJS/AST.cpp | |
parent | 1270df257bd043e3b9970d47784bfaf77cc3edf1 (diff) | |
download | serenity-e8430cf0d31afbbf6c6f3632697e262351b2182e.zip |
LibJS: Don't allow `delete super.property`
This should throw a ReferenceError, since `delete` is not allowed
on super references.
Diffstat (limited to 'Userland/Libraries/LibJS/AST.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/AST.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp index 198c573b14..5efd1fcaec 100644 --- a/Userland/Libraries/LibJS/AST.cpp +++ b/Userland/Libraries/LibJS/AST.cpp @@ -769,7 +769,7 @@ Reference MemberExpression::to_reference(Interpreter& interpreter, GlobalObject& if (!property_name.is_valid()) return Reference {}; - return Reference { object_value, property_name, object_value }; + return Reference { object_value, property_name, {} }; } Value UnaryExpression::execute(Interpreter& interpreter, GlobalObject& global_object) const |