Fix potential CCE in LightCodeInsight tests in non-JVM
This commit is contained in:
+3
-1
@@ -220,7 +220,9 @@ fun configureCompilerOptions(fileText: String, project: Project, module: Module)
|
||||
val facetSettings = KotlinFacet.get(module)!!.configuration.settings
|
||||
|
||||
if (jvmTarget != null) {
|
||||
(facetSettings.compilerArguments as K2JVMCompilerArguments).jvmTarget = jvmTarget
|
||||
val compilerArguments = facetSettings.compilerArguments
|
||||
require(compilerArguments is K2JVMCompilerArguments) { "Attempt to specify `$JVM_TARGET_DIRECTIVE` for non-JVM test" }
|
||||
compilerArguments.jvmTarget = jvmTarget
|
||||
}
|
||||
|
||||
if (options != null) {
|
||||
|
||||
Reference in New Issue
Block a user