-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Inference regression with inhomogeneous tuples #30976
Comments
It seems splatting has nothing to do with this issue. This splat-free example fails in a similar way (including the caching anomaly in REPL scope), though inference gets a little bit further
Note the
|
One more clue: the problem seems to stem from the empty tuple seed in the first call to |
IIUC, the first argument to |
Yes, the empty tuple grows to include one element for each of the
With this:
Also note that v0.6 could handle both this and the original example in the OP. Note also the cache anomaly noted by @KristofferC. That is a definite signal that there is a bug here. |
This is a very nice reason for why we need something like #31000. |
This is no longer an issue (since 1.1). Not sure what the relevant PR was. Closing! |
Ref: https://discourse.julialang.org/t/puzzling-inference-with-a-splat/20498/4
In short:
main
doesn't infer in v0.7 and above. It did in v0.6.A most interesting observation was made by @KristofferC: if we run this in global REPL scope (though not in a module), the order in which we first call
@call_warntype
affects inference (and therefore the performance ofmain
). Suggests a caching bug?The text was updated successfully, but these errors were encountered: