From 125530c71db526b06bf6d5061e0b298b7d2483e6 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 9 Jun 2022 19:43:22 +0100 Subject: [PATCH] LibJS: Mark a call of CreateTemporalDate as infallible This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/c403d3f --- .../Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp index a70bd999c2..b15385b64f 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp @@ -434,8 +434,8 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with_calendar) // 3. Let calendar be ? ToTemporalCalendar(calendarLike). auto* calendar = TRY(to_temporal_calendar(global_object, calendar_like)); - // 4. Return ? CreateTemporalDate(temporalDate.[[ISOYear]], temporalDate.[[ISOMonth]], temporalDate.[[ISODay]], calendar). - return TRY(create_temporal_date(global_object, temporal_date->iso_year(), temporal_date->iso_month(), temporal_date->iso_day(), *calendar)); + // 4. Return ! CreateTemporalDate(temporalDate.[[ISOYear]], temporalDate.[[ISOMonth]], temporalDate.[[ISODay]], calendar). + return MUST(create_temporal_date(global_object, temporal_date->iso_year(), temporal_date->iso_month(), temporal_date->iso_day(), *calendar)); } // 3.3.23 Temporal.PlainDate.prototype.until ( other [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.until