()
| 861 | } |
| 862 | |
| 863 | func (o *Object) ordinaryToPrimitiveString() Value { |
| 864 | if v := o.tryPrimitive("toString"); v != nil { |
| 865 | return v |
| 866 | } |
| 867 | |
| 868 | if v := o.tryPrimitive("valueOf"); v != nil { |
| 869 | return v |
| 870 | } |
| 871 | |
| 872 | panic(o.runtime.NewTypeError("Could not convert %v (%T) to primitive", o.self, o.self)) |
| 873 | } |
| 874 | |
| 875 | func (o *Object) tryExoticToPrimitive(hint Value) Value { |
| 876 | exoticToPrimitive := toMethod(o.self.getSym(SymToPrimitive, nil)) |
no test coverage detected