Throw error for generator function class constructor (#3489)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -1133,6 +1133,10 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
{
|
||||
return "Class constructor may not be an accessor.";
|
||||
}
|
||||
case PARSER_ERR_CLASS_CONSTRUCTOR_AS_GENERATOR:
|
||||
{
|
||||
return "Class constructor may not be a generator.";
|
||||
}
|
||||
case PARSER_ERR_CLASS_STATIC_PROTOTYPE:
|
||||
{
|
||||
return "Classes may not have a static property called 'prototype'.";
|
||||
|
||||
Reference in New Issue
Block a user