From 66f1f87757bb5260066eeedb4ffde71d67a5e090 Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Sat, 23 Jan 2016 18:05:04 +0100 Subject: [PATCH] Additional check of analyze resul, prevents a problem of passing BindingContext.EMPTY to the generation stage, fixes kapt tests in gradle plugins KT-8487 --- .../kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt index a3b9b8f9852..568996681f0 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt @@ -121,7 +121,8 @@ object KotlinToJVMBytecodeCompiler { } val targetDescription = "in targets [" + chunk.joinToString { input -> input.getModuleName() + "-" + input.getModuleType() } + "]" - val result = analyze(environment, targetDescription) ?: return false + val result = analyze(environment, targetDescription) + if (result == null || !result.shouldGenerateCode) return false ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()