Skip to content

Fix MethodError printing in case of ambiguity #17008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2016
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Jun 18, 2016

Fixes #17007.

@@ -116,7 +116,7 @@ function showerror(io::IO, ex::MethodError)
f = ex.f
meth = methods_including_ambiguous(f, arg_types)
if length(meth) > 1
return showerror_ambiguous(io, meth, f, arg_types)
return showerror_ambiguous(io, map(x->x[3], meth), f, arg_types)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeffBezanson, or would you rather change this in methods_including_ambiguous?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I guess it would be best for that function to return the same kind of result as methods.

@kshyatt kshyatt added the error handling Handling of exceptions by Julia or the user label Jun 20, 2016
@JeffBezanson JeffBezanson reopened this Jun 21, 2016
@JeffBezanson JeffBezanson merged commit f9dc84f into master Jun 21, 2016
@tkelman tkelman deleted the teh/ambig_printing branch June 21, 2016 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants