summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-06-09 19:43:22 +0100
committerAndreas Kling <kling@serenityos.org>2022-06-10 12:39:11 +0200
commit125530c71db526b06bf6d5061e0b298b7d2483e6 (patch)
treedca9d7d95001197a9a8649a99606b8f363ee7f18
parent817c79431dcdb76df962d850894d1c09808ac4a3 (diff)
downloadserenity-125530c71db526b06bf6d5061e0b298b7d2483e6.zip
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
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp4
1 files 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