LibJS: Reject ambiguous annotated time strings

This missing rejection will be caught by an upcoming Temporal.PlainTime
test.
This commit is contained in:
Timothy Flynn 2024-11-23 10:11:55 -05:00 committed by Tim Flynn
commit 0b59971ef9
Notes: github-actions[bot] 2024-11-24 00:38:22 +00:00
2 changed files with 13 additions and 2 deletions

View file

@ -1017,7 +1017,9 @@ ThrowCompletionOr<ParsedISODateTime> parse_iso_date_time(VM& vm, StringView iso_
// 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.
VERIFY(goal == allowed_formats.last());
// 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.
year_absent = true;