1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2023 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 Calling the method on an instance constructed with a builtin calendar causes
9 no observable array iteration when getting the calendar fields.
13 const arrayPrototypeSymbolIteratorOriginal = Array.prototype[Symbol.iterator];
14 Array.prototype[Symbol.iterator] = function arrayIterator() {
15 throw new Test262Error("Array should not be iterated");
18 const instance = new Temporal.PlainMonthDay(5, 1, "iso8601");
19 instance.toPlainDate({ year: 2005 });
21 Array.prototype[Symbol.iterator] = arrayPrototypeSymbolIteratorOriginal;