Does anyone know why would Kotlin need to target s...
# getting-started
c
Does anyone know why would Kotlin need to target specifically Java 8 for compiling in some cases? What features of Kotlin do need that? It has happened to me after trying some property based testing in Kotest (https://github.com/kotest/kotest), it said
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option
and it got fixed setting the project to compile into Java 8 with kotlinOptions What I understand from the error message is that some part of the library is directly injecting bytecodes meant for the JVM 1.8? I'd like to know more about this kind of details but I don't find much info searching by myself, maybe I'm not writing the right keywords when searching
t
Correct me if I'm wrong, but I think that's because the library itself has been compiled to Java 8 bytecode, therefore it cannot copy bytecode of inline functions to the function of a project targeting an older version