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
I know there's still ongoing work in making closures fast / fixing #15276, but this seemed weird enough that I thought it could be a bug and would be worth reporting:
functioninferred1() ::Any
a =1
(() -> a)()
endfunctioninferred2()
begin
a =1
(() -> a)()
endendfunctionnot_inferred() ::Anybegin
a =1
(() -> a)()
endend@code_warntypeinferred1()
@code_warntypeinferred2()
@code_warntypenot_inferred()
As you can see, once you have both the begin block and the return type annotation, it breaks the closure inference, although either alone is fine. I'm seeing this on 0.6.4 and 0.7/1.0.
The text was updated successfully, but these errors were encountered:
I know there's still ongoing work in making closures fast / fixing #15276, but this seemed weird enough that I thought it could be a bug and would be worth reporting:
As you can see, once you have both the begin block and the return type annotation, it breaks the closure inference, although either alone is fine. I'm seeing this on 0.6.4 and 0.7/1.0.
The text was updated successfully, but these errors were encountered: