Hi mates! We’ve opened a public discussion for the...
# language-proposals
m
Hi mates! We’ve opened a public discussion for the KEEP proposing explicit annotations for inline single-field value classes on all platforms. It introduces
@PlatformInline
for non-JVM code while preserving
@JvmInline
in a fully backwards-compatible manner. TL;DR on why: With full value classes (MFVCs), an unmarked-on-non-JVM single-field value class declaration becomes ambiguous. And changing how we handle it is visible and potentially breaking for external surfaces such as serialization or exports. That's why we need an analogue of
@JvmInline
for other platforms, so that one could explicitly say "this single-field value class is and should be handled as an inline value class" and not hope it will be correctly inferred implicitly. Feedback on the naming, semantics, and migration strategy is very welcome! KEEP / Discussion
🔥 1