In IntellilJ, I’m seeing “cannot infer type” red s...
# intellij
s
In IntellilJ, I’m seeing “cannot infer type” red squigglies in this Gradle code, even though the gradle buildscript compiles and runs just fine.
Copy code
kotlin {
    jvm {
        compilerOptions { jvmTarget = JvmTarget.JVM_1_8 }
        compilations.create("bench") { associateWith(this@jvm.compilations.getByName("main")) }
    }
}
Any ideas how to resolve this (other than guessing and specifying the type explicitly)? • IntelliJ IDEA 2025.2.2 Build #IU-252.26199.169 • Kotlin 2.2.20 • Gradle 8.14.3 • Repro code