1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.plainmonthday.prototype.toplaindate
8 Temporal.PlainMonthDay.prototype.toPlainDate does not implement [[Construct]], is not new-able
10 Built-in function objects that are not identified as constructors do not implement the
11 [[Construct]] internal method unless otherwise specified in the description of a particular
13 includes: [isConstructor.js]
14 features: [Reflect.construct, Temporal]
17 assert.throws(TypeError, () => {
18 new Temporal.PlainMonthDay.prototype.toPlainDate();
19 }, "Calling as constructor");
21 assert.sameValue(isConstructor(Temporal.PlainMonthDay.prototype.toPlainDate), false,
22 "isConstructor(Temporal.PlainMonthDay.prototype.toPlainDate)");