Add new metadata flag for class files compiled with FIR

Report a separate error when class files compiled with FIR are in
dependencies, in addition to the one for class files compiled with FE
1.0 + JVM IR.

 #KT-43592
This commit is contained in:
Alexander Udalov
2020-12-07 21:26:23 +01:00
parent cbd90c3af5
commit 3f517d7e8d
16 changed files with 74 additions and 37 deletions
@@ -190,6 +190,14 @@ class AnalyzerWithCompilerReport(
)
}
if (diagnostics.any { it.factory == Errors.FIR_COMPILED_CLASS }) {
messageCollector.report(
ERROR,
"Classes compiled by the new Kotlin compiler frontend were found in dependencies. " +
"Remove them from the classpath or use '-Xallow-jvm-ir-dependencies' to suppress errors"
)
}
return hasErrors
}