New Type Inference in Kotlin 1.3.0-rc-190

This has been answered in Slack Slack but I’ll repeat the answer for others here:

This flag hasn’t landed in the compiler yet. You have to use the old -X flags for now.

Groovy DSL:

compileKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-XXLanguage:+NewInference"]
    }
}

Kotlin DSL:

tasks.withType(KotlinCompile::class)
        .forEach {
            it.kotlinOptions { freeCompilerArgs = listOf("-Xnew-inference") }
        }
1 Like