Fix collecting source retention annotations

#KT-12187 fixed
This commit is contained in:
Alexey Tsvetkov
2016-05-05 20:05:07 +03:00
parent cac49b6609
commit 10b9be9f51
30 changed files with 268 additions and 30 deletions
@@ -70,7 +70,10 @@ public class CodegenTestUtil {
/* useTypeTableInSerializer = */ false,
configuration.get(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, false)
);
KotlinCodegenFacade.compileCorrectFiles(state, CompilationErrorHandler.THROW_EXCEPTION);
if (analysisResult.getShouldGenerateCode()) {
KotlinCodegenFacade.compileCorrectFiles(state, CompilationErrorHandler.THROW_EXCEPTION);
}
// For JVM-specific errors
AnalyzingUtils.throwExceptionOnErrors(state.getCollectedExtraJvmDiagnostics());