From 107b491b904303cdc266f14b36052b3b9acfe003 Mon Sep 17 00:00:00 2001 From: Sukera Date: Sun, 8 Dec 2024 08:01:27 +0100 Subject: [PATCH] Add closest candidates to MethodError in doctest --- src/RequiredInterfaces.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RequiredInterfaces.jl b/src/RequiredInterfaces.jl index 88dacc3..99a1f99 100644 --- a/src/RequiredInterfaces.jl +++ b/src/RequiredInterfaces.jl @@ -263,6 +263,10 @@ julia> bar(1, Baz()) ERROR: MethodError: no method matching bar(::Int64, ::Baz) The function `bar` exists, but no method is defined for this combination of argument types. +Closest candidates are: + bar(!Matched::Foo, !Matched::Int64) + @ Main none:1 + Stacktrace: [1] top-level scope @ none:1