Fix potential CCE in LightCodeInsight tests in non-JVM

This commit is contained in:
Simon Ogorodnik
2018-11-07 18:18:02 +03:00
parent f40cc2eb3f
commit cf9b2e6377
@@ -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) {