-
-
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
StackOverflow for typinf with long tuple #38364
Comments
Reduced: xs = tuple(("a" for _ in 1:2000)...);
foo(xs) = xs[1:20]
@code_typed foo(xs) I believe the calls to Lines 300 to 304 in 53a781d
Even if they are not hit at run-time, they still need to be inferred, and @code_typed Base.front(xs) also stack overflows.
|
There are various issues in the system when dealing with large tuples: if type inference doesn't get you, then subtyping or codegen probably will. Of course we want to fix all of this eventually, but for now you really just have to avoid big tuples. |
Thanks! (In my case they came up when calling |
Fixed by #55575. |
(Feel free to change the title - I don't know what's going on 🙃)
MWE:
output, full version here:
I noticed that the list comprehension needs to be contained inside a function for the error to occur.
Tested in Julia master (at time of writing) and 1.5.2, on Ubuntu Linux (intel xeon) and Windows (intel i5).
The text was updated successfully, but these errors were encountered: