How does the `language-version` compiler option w...
# announcements
e
How does the
language-version
compiler option works? Does it modify the outputted bytecode & metadata to be compatible with another version?
m
My understanding is it does, but currently only 7 and 8 have any real changes in them for bytecode. 11+ are there for consistency, but I don't think the compiler does anything differently for them yet. For example, Kotlin supports default methods on interfaces. If target is 6 or 7, it has to create classes/interfaces to support that behind the scenes. For 8, it can use the JDK8 bytecode directly, as 8 added support for that. But this specific example is more complicated than that as described here: https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html#default-methods-in-interfaces