Indentifier should be expected after static in class body. (#4061)

This patch fixes #4055.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-07-28 10:58:09 +02:00
committed by GitHub
parent 2e2b0dafb0
commit dbea5e6a22
2 changed files with 24 additions and 0 deletions
+4
View File
@@ -571,6 +571,10 @@ parser_parse_class_literal (parser_context_t *context_p, /**< context */
if (context_p->token.type == LEXER_RIGHT_BRACE)
{
if (JERRY_UNLIKELY (is_static))
{
parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);
}
break;
}