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:
Robert Fancsik
2020-01-07 14:52:01 +01:00
committed by GitHub
parent 22e52e45af
commit 003694d259
4 changed files with 40 additions and 4 deletions
+4
View File
@@ -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'.";