mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Class extends expression should be parsed is strict mode (#3801)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
parent
e76a1381e6
commit
5895b96bdb
@ -798,6 +798,11 @@ parser_parse_class (parser_context_t *context_p, /**< context */
|
||||
parser_emit_cbc_ext (context_p, CBC_EXT_PUSH_ANONYMOUS_CLASS_ENV);
|
||||
}
|
||||
|
||||
bool is_strict = (context_p->status_flags & PARSER_IS_STRICT) != 0;
|
||||
|
||||
/* 14.5. A ClassBody is always strict code. */
|
||||
context_p->status_flags |= PARSER_IS_STRICT;
|
||||
|
||||
if (context_p->token.type == LEXER_KEYW_EXTENDS)
|
||||
{
|
||||
lexer_next_token (context_p);
|
||||
@ -815,11 +820,6 @@ parser_parse_class (parser_context_t *context_p, /**< context */
|
||||
parser_raise_error (context_p, PARSER_ERR_LEFT_BRACE_EXPECTED);
|
||||
}
|
||||
|
||||
bool is_strict = context_p->status_flags & PARSER_IS_STRICT;
|
||||
|
||||
/* 14.5. A ClassBody is always strict code. */
|
||||
context_p->status_flags |= PARSER_IS_STRICT;
|
||||
|
||||
/* ClassDeclaration is parsed. Continue with class body. */
|
||||
parser_parse_class_literal (context_p, opts);
|
||||
|
||||
|
||||
@ -517,7 +517,6 @@
|
||||
<test id="language/statements/class/name-binding/in-extends-expression-assigned.js"><reason></reason></test>
|
||||
<test id="language/statements/class/name-binding/in-extends-expression.js"><reason></reason></test>
|
||||
<test id="language/statements/class/strict-mode/arguments-caller.js"><reason></reason></test>
|
||||
<test id="language/statements/class/strict-mode/with.js"><reason></reason></test>
|
||||
<test id="language/statements/class/syntax/early-errors/class-body-static-method-get-propname-prototype.js"><reason></reason></test>
|
||||
<test id="language/statements/continue/labeled-continue.js"><reason></reason></test>
|
||||
<test id="language/statements/continue/nested-let-bound-for-loops-labeled-continue.js"><reason></reason></test>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user