diff --git a/boa/src/builtins/function_object.rs b/boa/src/builtins/function_object.rs index f90d4b3e2bf..0b226883b01 100644 --- a/boa/src/builtins/function_object.rs +++ b/boa/src/builtins/function_object.rs @@ -37,14 +37,14 @@ pub struct Function { pub internal_slots: Box>, /// Properties pub properties: Box>, - // Function Kind + /// Function Kind pub function_kind: FunctionKind, - // is constructor?? + /// is constructor?? pub is_constructor: bool, } impl Function { - // https://tc39.es/ecma262/#sec-functionallocate + /// https://tc39.es/ecma262/#sec-functionallocate pub fn allocate(proto: Value, mut kind: FunctionKind) -> Function { let needs_construct: bool; diff --git a/boa/src/builtins/number/mod.rs b/boa/src/builtins/number/mod.rs index 74bc723a5a1..3195d14ef75 100644 --- a/boa/src/builtins/number/mod.rs +++ b/boa/src/builtins/number/mod.rs @@ -23,7 +23,10 @@ fn to_number(value: &Value) -> Value { to_value(0) } } - ValueData::Function(_) | ValueData::Symbol(_) | ValueData::Undefined => to_value(f64::NAN), + ValueData::FunctionObj(_) + | ValueData::Function(_) + | ValueData::Symbol(_) + | ValueData::Undefined => to_value(f64::NAN), ValueData::Integer(i) => to_value(f64::from(i)), ValueData::Object(ref o) => (o).deref().borrow().get_internal_slot("NumberData"), ValueData::Null => to_value(0),