Is there a comparison resource somewhere of how the JDK impacts generated Kotlin code? I'm particularly interested in changes since Java 11. Does targetting a more recent Java version change the generated code, and how?
➕ 3
u
udalov
12/10/2024, 8:12 AM
At the moment, I think there are only two features which are affected by JVM bytecode target version:
1. If JVM target >= 9, string concatenation uses invokedynamic
2. If JVM target >= 17, the
PermittedSubclasses
attribute is written, which makes switches over Kotlin sealed classes exhaustive in Java
But there are plans to support more, e.g. KT-65688.