From cb5f7bf696ffa8670c7ebd9b26a38fb794bdaf08 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 18 Jul 2022 08:38:47 -0400 Subject: [PATCH] LibJS: Add missing VERIFY_NOT_REACHED in string-to-enum conversion Noticed this while working on [[RoundingMode]]. --- Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp index bcb69eed40..8f8b3cc8e0 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.cpp @@ -215,6 +215,8 @@ void NumberFormatBase::set_rounding_mode(StringView rounding_mode) m_rounding_mode = RoundingMode::HalfTrunc; else if (rounding_mode == "trunc"sv) m_rounding_mode = RoundingMode::Trunc; + else + VERIFY_NOT_REACHED(); } StringView NumberFormatBase::trailing_zero_display_string() const