-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Loose signature of push! fallback (results in confusing MethodError) #12919
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
Comments
I hit something like this recently. There's some implicit redirection of one |
The one that causes the |
The fallback method is printed in the backtrace |
One thing we could do here is to remove |
Just to make the tradeoffs clear, the alternative perspective is that |
I don't think |
Yeah, I think enforcing an |
@johnmyleswhite, @yuyichao, thank you for looking into this. I understand now what was happening, and as you say, this is pretty obvious when looking at the I have updated the issue accordingly. The The suggested tightening of the signature in Base seems like a good solution, providing it doesn't cause breakage. |
I am struggling to find a minimal test case for this problem.
The following code:
Fails with the following error:
The error suggests that
push!
is being called with two arguments, but in fact, the offending line callspush!
correctly with 4 arguments:push!(lsr, zero(T), f_x, dphi0)
.An error should be thrown, since I have forced
f_x
to single precision (it is the output offunction f_gd(x)
), but this should have read:For some reason, the last two argument types are missing.
I can reproduce this behaviour on a
0.4-dev
and a0.4-pre
on three different architectures (including JuliaBox)The text was updated successfully, but these errors were encountered: