We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 266d7c1 commit b9b4cceCopy full SHA for b9b4cce
idea/idea-analysis/src/org/jetbrains/kotlin/idea/project/Platform.kt
@@ -145,6 +145,13 @@ private fun getExtraLanguageFeatures(
145
146
fun KtElement.createCompilerConfiguration(): CompilerConfiguration = CompilerConfiguration().apply {
147
languageVersionSettings = this@createCompilerConfiguration.languageVersionSettings
148
+
149
+ val module = ModuleUtilCore.findModuleForPsiElement(this@createCompilerConfiguration)
150
+ val platform = module?.targetPlatform?.version
151
+ if (platform is JvmTarget) {
152
+ put(JVMConfigurationKeys.JVM_TARGET, platform)
153
+ }
154
155
isReadOnly = true
156
}
157
0 commit comments