Why Can't I Evaluate Expressions When Debugging Kotlin Tests?
Answered
I have a gradle multi-project build with a mix of java and kotlin modules.
In one of the kotlin modules I have this
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
languageVersion = "1.1"
apiVersion = "1.1"
jvmTarget = "1.8"
javaParameters = true
}
}
However, whenever I try to evaluate an expression when debugging some tests I get this error:
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
In the IDEA project settings, every Kotlin facet has the target platform set to 1.8 and ever module has the language level set to 8 (lamdas..) so why am I getting this error?
Please sign in to leave a comment.
Looks like https://youtrack.jetbrains.com/issue/KT-22227.
Please use https://discuss.kotlinlang.org/ for any questions related to Kotlin next time.
Cross posted here https://discuss.kotlinlang.org/t/why-cant-i-evaluate-expressions-when-debugging-kotlin-tests/7214