-
-
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 (?) hang on recursive methods #17278
Comments
Sadly, |
15 is still a very high number for the permitted branching factor, and is strongly dependent on one of our other unreliable heuristics actually kicking in fast enough. |
But in this case there's only one branch that's relevant: if the 2nd argument isn't a |
I don't really understand the inference machinery well, but perhaps it's also worth pointing out that there are also only 3 indexes---naively, it doesn't seem that the tuple length limit is relevant. |
As an experiment, I checked out julia-0.4 (before your inference rewrite), bumped |
Interestingly, this implementation: _flatten() = ()
_flatten(i, I...) = (i, _flatten(I...)...)
_flatten(i::CartesianIndex, I...) = (i.I..., _flatten(I...)...) has no problem on master. Cross-ref #17126. |
Here's what I suspect is a second example of the problem noted in #17137, but which can be easily replicated on master:
All those Ctrl-Cs come from the fact that this call hangs, at least for minutes.
Interestingly, change
i
toi::Int
in the second_flatten
method, and it works fine.Discovered in the course of trying to fix #17275.
The text was updated successfully, but these errors were encountered: