https://kotlinlang.org logo
#announcements
Title
# announcements
r

raulraja

09/27/2017, 8:53 PM
Trying to understand the reason for future reference why
inline
functions marked as
tailrec
can't be recursive in Kotlin. Is that because of fear of inlining too much?. Shouldn't
tailrec
take precedence and what gets inline is just a
while
loop? Thanks!
d

diesieben07

09/27/2017, 8:59 PM
I would suspect it's a limitation of the compiler, tail-recursion optimization might happen at a later stage than inlining.
3 Views