diff --git a/compiler+runtime/src/cpp/jank/runtime/core/math.cpp b/compiler+runtime/src/cpp/jank/runtime/core/math.cpp index 01382dab5..809b93997 100644 --- a/compiler+runtime/src/cpp/jank/runtime/core/math.cpp +++ b/compiler+runtime/src/cpp/jank/runtime/core/math.cpp @@ -1795,7 +1795,7 @@ namespace jank::runtime obj::big_integer_ref to_big_integer(object_ref const o) { - return visit_number_like( + return visit_object( [&](auto const typed_o) -> obj::big_integer_ref { using T = typename decltype(typed_o)::value_type; @@ -1803,7 +1803,7 @@ namespace jank::runtime { return typed_o; } - else if constexpr(std::same_as) + else if constexpr(std::same_as || std::same_as) { return make_box(typed_o->data); } @@ -1828,7 +1828,7 @@ namespace jank::runtime obj::big_decimal_ref to_big_decimal(object_ref const o) { - return visit_number_like( + return visit_object( [&](auto const typed_o) -> obj::big_decimal_ref { using T = typename decltype(typed_o)::value_type; @@ -1837,7 +1837,7 @@ namespace jank::runtime return make_box(typed_o->to_real()); } else if constexpr(std::same_as || std::same_as - || std::same_as) + || std::same_as || std::same_as) { return make_box(typed_o->data); }