diff --git a/boa/src/builtins/function_object.rs b/boa/src/builtins/function_object.rs index 00576cc6358..e0cb620ef45 100644 --- a/boa/src/builtins/function_object.rs +++ b/boa/src/builtins/function_object.rs @@ -53,8 +53,6 @@ pub enum FunctionBody { /// #[derive(Finalize, Clone)] pub struct Function { - /// Kind, this *may* not be needed but will keep for now - pub kind: ObjectKind, /// Internal Slots pub internal_slots: Box>, /// Properties @@ -103,7 +101,6 @@ impl Function { .value(to_value(parameter_list.len())); let mut func = Function { - kind: ObjectKind::Function, internal_slots: Box::new(HashMap::new()), properties: Box::new(HashMap::new()), function_kind: kind, @@ -262,6 +259,7 @@ impl Debug for Function { /// pub fn create_function_prototype() { let mut function_prototype: Object = Object::default(); - // Set Kind to function + // Set Kind to function (for historical & compatibility reasons) + // https://tc39.es/ecma262/#sec-properties-of-the-function-prototype-object function_prototype.kind = ObjectKind::Function; }