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
+1
View File
@@ -146,6 +146,7 @@ extra["versions.markdown"] = "0.1.25"
val isTeamcityBuild = project.hasProperty("teamcity") || System.getenv("TEAMCITY_VERSION") != null
val intellijUltimateEnabled = project.getBooleanProperty("intellijUltimateEnabled") ?: isTeamcityBuild
val effectSystemEnabled by extra(project.getBooleanProperty("kotlin.compiler.effectSystemEnabled") ?: false)
val newInferenceEnabled by extra(project.getBooleanProperty("kotlin.compiler.newInferenceEnabled") ?: false)
val intellijSeparateSdks = project.getBooleanProperty("intellijSeparateSdks") ?: false
+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",
+1
View File
@@ -4,6 +4,7 @@ org.gradle.configureondemand=false
org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m
kotlin.compiler.effectSystemEnabled=true
kotlin.compiler.newInferenceEnabled=true
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
#bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
#bootstrap.kotlin.version=1.1.50-dev-1451