From 34371b9b61126be8bcf023844cbbcd22847bc6cb Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 10 Mar 2022 17:22:15 +0100 Subject: [PATCH] LibJS: Fix numeric type confusion in ToTemporalRoundingIncrement This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/6e59366 --- .../LibJS/Runtime/Temporal/AbstractOperations.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index 3d505d0ac1..f3bff4b04e 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -298,31 +298,31 @@ ThrowCompletionOr to_temporal_rounding_increment(GlobalObject& global_objec double maximum; // 1. If dividend is undefined, then if (!dividend.has_value()) { - // a. Let maximum be +โˆž. + // a. Let maximum be +โˆž๐”ฝ. maximum = INFINITY; } // 2. Else if inclusive is true, then else if (inclusive) { - // a. Let maximum be dividend. + // a. Let maximum be ๐”ฝ(dividend). maximum = *dividend; } // 3. Else if dividend is more than 1, then else if (*dividend > 1) { - // a. Let maximum be dividend โˆ’ 1. + // a. Let maximum be ๐”ฝ(dividend โˆ’ 1). maximum = *dividend - 1; } // 4. Else, else { - // a. Let maximum be 1. + // a. Let maximum be 1๐”ฝ. maximum = 1; } - // 5. Let increment be ? GetOption(normalizedOptions, "roundingIncrement", ยซ Number ยป, empty, 1). + // 5. Let increment be ? GetOption(normalizedOptions, "roundingIncrement", ยซ Number ยป, empty, 1๐”ฝ). auto increment_value = TRY(get_option(global_object, normalized_options, vm.names.roundingIncrement, { OptionType::Number }, {}, Value(1))); VERIFY(increment_value.is_number()); auto increment = increment_value.as_double(); - // 6. If increment < 1 or increment > maximum, throw a RangeError exception. + // 6. If increment < 1๐”ฝ or increment > maximum, throw a RangeError exception. if (increment < 1 || increment > maximum) return vm.throw_completion(global_object, ErrorType::OptionIsNotValidValue, increment, "roundingIncrement");