Skip to content
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

Feature request: better error message for @which a .+ b #34192

Closed
yuxi-liu-wired opened this issue Dec 25, 2019 · 1 comment
Closed

Feature request: better error message for @which a .+ b #34192

yuxi-liu-wired opened this issue Dec 25, 2019 · 1 comment

Comments

@yuxi-liu-wired
Copy link
Contributor

julia> @which [2 3] .+ [1 2]
ERROR: UndefVarError: .+ not defined

My intuition is something like a .+ b gets changed to broadcasted_+(a, b), and was hoping it would return something like
broadcasted_+(a::Array{Int64}...)
but now I see it wouldn’t make sense.

The error message could be made to say something like
Did you mean '@which broadcast(+, a, b)'?

@mbauman
Copy link
Sponsor Member

mbauman commented Dec 31, 2019

Duplicate of #28615

@mbauman mbauman marked this as a duplicate of #28615 Dec 31, 2019
@mbauman mbauman closed this as completed Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants