Ah, that's good. There was a talk at KotlinConf 2017 that said it boxed; I'm glad that's not true.
r
Ruckus
05/23/2018, 7:31 PM
Kotlin will box basically anywhere Java will box, basically anywhere you use generics, nullable values, or objects (e.g. returning an
Int
from a function that returns
Any
will box it)
m
mp
05/23/2018, 7:32 PM
Cool, thanks for clarifying.
👍 1
r
Ruckus
05/23/2018, 7:34 PM
It is actually a bit smarter than that though. For example, if you have an inlined higher order function (which use generics), it will use the primitive type instead.