Fix class constructor as accessor check (#4880)

This patch fixes #4874.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
Robert Fancsik
2021-12-15 10:32:11 +01:00
committed by GitHub
parent ee59c226d9
commit d37ff33dbe
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -726,7 +726,7 @@ parser_parse_class_body (parser_context_t *context_p, /**< context */
}
else if (parser_is_constructor_literal (context_p))
{
JERRY_ASSERT (!is_static);
JERRY_ASSERT (!is_static || is_private);
parser_raise_error (context_p, PARSER_ERR_CLASS_CONSTRUCTOR_AS_ACCESSOR);
}