Generate 'DefaultImpls' for jvm 8 target only within compiler option
This commit is contained in:
@@ -139,6 +139,17 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
}
|
||||
}
|
||||
|
||||
if (arguments.interfaceCompatibility) {
|
||||
val target = configuration.get(JVMConfigurationKeys.JVM_TARGET)
|
||||
if (target != JvmTarget.JVM_1_8) {
|
||||
val errorMessage = "The -Xinterface-compatibility option has effect only for JVM target bytecode version 1.8."
|
||||
messageCollector.report(CompilerMessageSeverity.WARNING, errorMessage, CompilerMessageLocation.NO_LOCATION)
|
||||
}
|
||||
else {
|
||||
configuration.put(JVMConfigurationKeys.INTERFACE_COMPATIBILITY, true)
|
||||
}
|
||||
}
|
||||
|
||||
putAdvancedOptions(configuration, arguments)
|
||||
|
||||
messageCollector.report(CompilerMessageSeverity.LOGGING, "Configuring the compilation environment", CompilerMessageLocation.NO_LOCATION)
|
||||
|
||||
Reference in New Issue
Block a user