From 784e872851f6cc3049d7c0f975a93871eef45f33 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 5 Dec 2024 10:12:47 -0500 Subject: [PATCH] LibJS: Remove errant assertion from ParseISODateTime This is an editorial change in the Temporal proposal. See: https://github.com/tc39/proposal-temporal/commit/728beeb --- .../LibJS/Runtime/Temporal/AbstractOperations.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index 288cc64c71d..818ef56d620 100644 --- a/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -1201,16 +1201,10 @@ ThrowCompletionOr parse_iso_date_time(VM& vm, StringView iso_ return vm.throw_completion(ErrorType::TemporalInvalidCalendarIdentifier, *calendar); } - // 4. If goal is TemporalMonthDayString and parseResult does not contain a DateYear Parse Node, then - if (goal == Production::TemporalMonthDayString && !parse_result->date_year.has_value()) { - // a. Assert: goal is the last element of allowedFormats. - // FIXME: Spec issue: This assertion is possibly incorrect. - // https://github.com/tc39/proposal-temporal/issues/3045 - // VERIFY(goal == allowed_formats.last()); - - // b. Set yearAbsent to true. + // 4. If goal is TemporalMonthDayString and parseResult does not contain a DateYear Parse Node, set + // yearAbsent to true. + if (goal == Production::TemporalMonthDayString && !parse_result->date_year.has_value()) year_absent = true; - } } }