diff options
-rw-r--r-- | Userland/Libraries/LibJS/Parser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp index 303cf457a2..962d228598 100644 --- a/Userland/Libraries/LibJS/Parser.cpp +++ b/Userland/Libraries/LibJS/Parser.cpp @@ -1297,6 +1297,9 @@ NonnullRefPtr<Expression> Parser::parse_expression(int min_precedence, Associati } } + if (is<SuperExpression>(*expression)) + syntax_error("'super' keyword unexpected here"); + check_for_invalid_object_property(expression); if (match(TokenType::Comma) && min_precedence <= 1) { |