It doesn't, but it might be an idea to pull an interface out to get the behaviour. Bit more work than I was hoping for though.
p
phldavies
11/17/2022, 2:36 PM
I wonder if a simple plugin using https://square.github.io/kotlinpoet or KSP would work to generate some extension properties to directly expose the properties of the boxed value might work
r
Rob Elliot
11/17/2022, 2:36 PM
Thanks, I was just checking that there was nothing out of the box I was ignorant of - I can always delegate manually.
y
Youssef Shoaib [MOD]
11/17/2022, 4:59 PM
A feature proposal could be to have `transparent value class`es that pretend like they're subtypes of their underlying value but without being allowed to
override
any of its methods or properties (potentially even including
toString
for consistency's sake). I made a similar feature proposal a while back, but it was very speculative and under-specified. Transparent value classes could also be a good gateway for Kotlin to get into refined types, but that's a whole another story.