Hi) I'm trying to test New Type Inference! But I c...
# announcements
a
Hi) I'm trying to test New Type Inference! But I can not configure it( I use gradle kotlin DSL with plugin: kotlin("gradle-plugin", "1.3.0-rc-190") and kotlin version kotlin("stdlib-jdk7", "1.3.0-rc-190") I can not enable newInference in gradle DSL:
Copy code
kotlin {
    experimental {
        newInference = "enable" //this does not compile
    }
}
because ExperimentalExtension is missing newInference variable
Copy code
org.jetbrains.kotlin.gradle.dsl.ExperimentalExtension:
open class ExperimentalExtension {
    var coroutines: Coroutines? = null
}
h
Please put code snippets in triple backticks `
j
This flag hasn't landed in the compiler yet. You have to use the old
-X
flags for now. I forget the names which enable the new inference. There's two of them...
a
@jw thanks - got it 🙂
@jw can confirm that
Copy code
afterEvaluate {
    tasks.withType(KotlinCompile::class)
        .forEach {
            it.kotlinOptions { freeCompilerArgs = listOf("-Xnew-inference") }
        }
}
fix the issue 🙂