Pavlo Liapota
01/13/2019, 10:51 AMinterface Foo<T> {
val bar: T
}
class IntFoo(
override val bar: Int
) : Foo<Int>
In bytecode method IntFoo#getBar()
will return Integer
, so on every property usage
val b: Int = intFoo.bar
value will be boxed and then unboxed.
But JIT compiler should be smart enough to figure it out eventually, so overhead should not be considerable, right?