Always show "closest candidates" when there is a MethodError
#46236
Labels
error messages
Better, more actionable error messages
MethodError
#46236
Currently we have heuristics for building a list of "closest candidate" methods to display when a user hits a
MethodError
, but these heuristics can result in no methods making the list... so we show none of the valid methods which seems less helpful than showing some (/any) of the valid methods.For example, this seems to happens if none of the argument types match and more than two arguments were given.
julia/base/errorshow.jl
Line 484 in 35ac6e1
I don't know why this heuristic was chosen, and I think we should remove such heuristics that discard methods. We can still show only 3 candidates and ordered by some measure of "closeness", but showing some methods seems strictly more informative than showing none.
very related to #32470 (but i've opened this separately as this is a more narrow request and that one seem to have become about how to print this information in a good way, rather than which methods to print)
The text was updated successfully, but these errors were encountered: