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
@generatedfunctionf(::Any)
:(for i in1end)
endprintln(@code_typedf(1.2))
Output is attached below. Somehow the automatically generated names in the body of the generated function uses a independent counter from the original function and this causes the generated variable names to collide.
Since the generated names in the argument lists are never used, this may not cause any behavioral difference but it does cause the variable to be lifted to Any and introduce all kinds of boxing etc. (See the Any[symbol("#s1"),Any,2] in the code_typed output below)
(@code_warntype can show that the variable is not type stable but it is almost impossible to tell from it's output why this is happening...)
To reproduce:
Output is attached below. Somehow the automatically generated names in the body of the generated function uses a independent counter from the original function and this causes the generated variable names to collide.
Since the generated names in the argument lists are never used, this may not cause any behavioral difference but it does cause the variable to be lifted to
Any
and introduce all kinds of boxing etc. (See theAny[symbol("#s1"),Any,2]
in thecode_typed
output below)(
@code_warntype
can show that the variable is not type stable but it is almost impossible to tell from it's output why this is happening...)Output
The text was updated successfully, but these errors were encountered: