1 // Copyright (C) 2016 The V8 Project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-isfinite-number
7 Throws a TypeError if the result of calling number.@@toPrimitive is an Object
11 1. Let num be ? ToNumber(number).
13 ToPrimitive ( input [ , PreferredType ] )
16 4. Let exoticToPrim be ? GetMethod(input, @@toPrimitive).
17 5. If exoticToPrim is not undefined, then
18 a. Let result be ? Call(exoticToPrim, input, « hint »).
19 b. If Type(result) is not Object, return result.
20 c. Throw a TypeError exception.
21 features: [Symbol.toPrimitive]
25 obj[Symbol.toPrimitive] = function() {
29 assert.throws(TypeError, function() {