Fix inner classes in class heritage environment (#2686)
This patch is the proper fix for #2667, since #2269 did not fix the problem entirely. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Akos Kiss
parent
cfdb5eddb3
commit
86e60ddf8d
@@ -99,11 +99,12 @@ typedef enum
|
||||
ECMA_PARSE_NO_OPTS = 0, /**< no options passed */
|
||||
ECMA_PARSE_STRICT_MODE = (1u << 0), /**< enable strict mode */
|
||||
ECMA_PARSE_DIRECT_EVAL = (1u << 1), /**< eval is called directly (ECMA-262 v5, 15.1.2.1.1) */
|
||||
/* These three status flags must be in this order. See PARSER_CLASS_PARSE_OPTS_OFFSET. */
|
||||
/* These four status flags must be in this order. See PARSER_CLASS_PARSE_OPTS_OFFSET. */
|
||||
ECMA_PARSE_CLASS_CONSTRUCTOR = (1u << 2), /**< a class constructor is being parsed (this value must be kept in
|
||||
* in sync with PARSER_CLASS_CONSTRUCTOR) */
|
||||
ECMA_PARSE_HAS_SUPER = (1u << 3), /**< the current context has super reference */
|
||||
ECMA_PARSE_HAS_STATIC_SUPER = (1u << 4), /**< the current context is a static class method */
|
||||
ECMA_PARSE_HAS_IMPL_SUPER = (1u << 4), /**< the current context has implicit parent class */
|
||||
ECMA_PARSE_HAS_STATIC_SUPER = (1u << 5), /**< the current context is a static class method */
|
||||
} ecma_parse_opts_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1053,7 +1053,7 @@ ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
|
||||
/* Catch the special case when a the class extends value in null
|
||||
and the class has no explicit constructor to raise TypeError.*/
|
||||
JERRY_ASSERT (!ecma_op_function_has_construct_flag (arguments_list_p));
|
||||
JERRY_ASSERT (ecma_get_object_prototype (func_obj_p) == NULL);
|
||||
JERRY_ASSERT (ecma_get_object_prototype (func_obj_p) == ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE));
|
||||
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Super constructor null is not a constructor."));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user