min
07/16/2026, 7:39 AMvalue class gets optimised to use the same representation as the wrapped type, but what will happen when the class kind starts allowing more than one field? Will value types with one field be special cased?Alejandro Serrano.Mena
07/16/2026, 7:41 AMmin
07/19/2026, 8:26 AMvalue class MyMono(val a: Int)
value class MyPair(
val a: Int,
val b: String,
)
I’m wondering if MyMono will be special cased to have the same representation as a bare Int and MyPair will be inlined such that instantiating it in a function would have the same representation as normal local val a: Int and val b: String declarations.