1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

LibJS/Bytecode: Support using MemberExpression as rest property

Also, don't assert while dumping an AST with this construct.

7 new passes on test262. :^)
This commit is contained in:
Andreas Kling 2023-07-02 11:24:55 +02:00
parent 0df7255fe7
commit b0ae1e80fb
2 changed files with 20 additions and 11 deletions

View file

@ -2461,8 +2461,12 @@ void BindingPattern::dump(int indent) const
outln("(Identifier)");
if (entry.name.has<NonnullRefPtr<Identifier const>>()) {
entry.name.get<NonnullRefPtr<Identifier const>>()->dump(indent + 3);
} else {
} else if (entry.name.has<NonnullRefPtr<Expression const>>()) {
entry.name.get<NonnullRefPtr<Expression const>>()->dump(indent + 3);
} else {
VERIFY(entry.name.has<Empty>());
print_indent(indent + 3);
outln("<empty>");
}
} else if (entry.is_elision()) {
print_indent(indent + 2);