Join Slack
I don't think that function can be tail call optimized even without the suspend modifier. The recurs...
# coroutines
m
marstran
04/26/2018, 10:36 AM
I don't think that function can be tail call optimized even without the suspend modifier. The recursive call is within the let-block.
u
uli
04/26/2018, 11:23 AM
Shouldn't the compiler error out if this is true?
m
marstran
04/26/2018, 11:25 AM
There's a warning.
u
uli
04/26/2018, 11:30 AM
I don't even see a warning
uli
04/26/2018, 11:34 AM
tailrec is probably allowed, as let is an inline fun
2
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by