From 49db5a798ed51ee7599e4dd79f1e7e4da4009072 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 2 Nov 2017 17:40:14 -0700 Subject: [PATCH] Fixed coroutinesSate syntax. --- .../com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt index 0db6a5f3..588c2c85 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.cli.common.messages.MessageCollector import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler +import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.config.Services import org.jetbrains.kotlin.incremental.ICReporter import org.jetbrains.kotlin.incremental.makeIncrementally @@ -178,10 +179,10 @@ class KotlinCompiler @Inject constructor( "skip-runtime-version-check" -> args.skipRuntimeVersionCheck = true "single-module" -> args.singleModule = true "load-builtins-from-dependencies" -> args.loadBuiltInsFromDependencies = true - // TODO fix - //"coroutines=enable" -> args.coroutinesEnable = true - //"coroutines=warn" -> args.coroutinesWarn = true - //"coroutines=error" -> args.coroutinesError = true + + "coroutines=enable" -> args.coroutinesState = LanguageFeature.State.ENABLED.name + "coroutines=warn" -> args.coroutinesState = LanguageFeature.State.ENABLED_WITH_WARNING.name + "coroutines=error" -> args.coroutinesState = LanguageFeature.State.ENABLED_WITH_ERROR.name "no-inline" -> args.noInline = true "multi-platform" -> args.multiPlatform = true "no-check-impl" -> args.noCheckImpl = true