From fcb67ed2751dff04f87c03fa0bad28aae75d946d Mon Sep 17 00:00:00 2001 From: Saket Date: Mon, 4 Nov 2024 12:30:35 +0530 Subject: [PATCH] fix(multimethods): show multimethod's name in errors --- .../src/cpp/jank/runtime/obj/multi_function.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler+runtime/src/cpp/jank/runtime/obj/multi_function.cpp b/compiler+runtime/src/cpp/jank/runtime/obj/multi_function.cpp index da8b91772..634c37253 100644 --- a/compiler+runtime/src/cpp/jank/runtime/obj/multi_function.cpp +++ b/compiler+runtime/src/cpp/jank/runtime/obj/multi_function.cpp @@ -232,7 +232,7 @@ namespace jank::runtime { throw std::runtime_error{ fmt::format( "Preference conflict in multimethod '{}': {} is already preferred to {}", - name, + runtime::to_string(name), runtime::to_string(y), runtime::to_string(x)) }; } @@ -304,7 +304,7 @@ namespace jank::runtime if(target == obj::nil::nil_const()) { throw std::runtime_error{ fmt::format("No method in multimethod '{}' for dispatch value: {}", - name, + runtime::to_string(name), runtime::to_string(dispatch_val)) }; } return target; @@ -350,7 +350,7 @@ namespace jank::runtime throw std::runtime_error{ fmt::format( "Multiple methods in multimethod '{}' match dispatch value: {} -> {} and {}, and " "neither is preferred", - name, + runtime::to_string(name), runtime::to_string(dispatch_val), runtime::to_string(entry_key), runtime::to_string(best_entry->first())) };