Additional check of analyze resul, prevents a problem of passing BindingContext.EMPTY to the generation stage, fixes kapt tests in gradle plugins

KT-8487
This commit is contained in:
Ilya Chernikov
2016-01-23 18:05:04 +01:00
committed by Alexey Tsvetkov
parent daab3db062
commit 66f1f87757
@@ -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()