You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TailCall attribute does not lead to errors when recursive call is in a list comprehension #16649
We analyze the latter correctly as sequential expression and produce the warning, and we end up analysing the former as application and decide that it's tail recursive, which we shouldn't.
Activity
Larocceau commentedon Feb 3, 2024
@dawedawe since you contributed to this feature this might be of interest to you
dawedawe commentedon Feb 3, 2024
Thanks for the finding, I'll work on it.
vzarytovskii commentedon Feb 5, 2024
Difference is that list expression will use list collector, and will result in something like
But when the analysis happens, it probably thinks it's atomic or something.
vzarytovskii commentedon Feb 5, 2024
Oh, yeah
Will result in something like (roughly):
Whereas
into
We analyze the latter correctly as sequential expression and produce the warning, and we end up analysing the former as application and decide that it's tail recursive, which we shouldn't.