Enable new inference in the compiler

This commit is contained in:
Mikhail Zarechenskiy
2018-03-19 15:13:45 +03:00
parent 152a9a21f9
commit ae35a3b324
3 changed files with 14 additions and 6 deletions
+12 -6
View File
@@ -14,17 +14,23 @@ val compilerModules: Array<String> by rootProject.extra
val otherCompilerModules = compilerModules.filter { it != path }
val effectSystemEnabled: Boolean by rootProject.extra
if (effectSystemEnabled) {
allprojects {
tasks.withType<KotlinCompile<*>> {
kotlinOptions {
freeCompilerArgs += listOf("-Xeffect-system")
val newInferenceEnabled: Boolean by rootProject.extra
configureFreeCompilerArg(effectSystemEnabled, "-Xeffect-system")
configureFreeCompilerArg(newInferenceEnabled, "-Xnew-inference")
fun configureFreeCompilerArg(isEnabled: Boolean, compilerArgument: String) {
if (isEnabled) {
allprojects {
tasks.withType<KotlinCompile<*>> {
kotlinOptions {
freeCompilerArgs += listOf(compilerArgument)
}
}
}
}
}
val depDistProjects = listOf(
":kotlin-script-runtime",
":kotlin-stdlib",