File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
idea/src/org/jetbrains/kotlin/idea/quickfix Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ sealed class EnableUnsupportedFeatureFix(
43
43
val module = ModuleUtilCore .findModuleForPsiElement(file) ? : return
44
44
val facetSettings = KotlinFacet .get(module)?.configuration?.settings ? : return
45
45
ModuleRootModificationUtil .updateModel(module) {
46
- facetSettings.versionInfo.languageLevel = targetVersion
46
+ with (facetSettings.versionInfo) {
47
+ languageLevel = targetVersion
48
+ apiLevel = targetVersion
49
+ }
47
50
}
48
51
}
49
52
}
@@ -54,7 +57,10 @@ sealed class EnableUnsupportedFeatureFix(
54
57
override fun getText () = " Set project language level to ${targetVersion.versionString} "
55
58
56
59
override fun invoke (project : Project , editor : Editor ? , file : KtFile ) {
57
- KotlinCommonCompilerArgumentsHolder .getInstance(project).settings.languageVersion = targetVersion.versionString
60
+ with (KotlinCommonCompilerArgumentsHolder .getInstance(project).settings) {
61
+ languageVersion = targetVersion.versionString
62
+ apiVersion = targetVersion.versionString
63
+ }
58
64
ProjectRootManagerEx .getInstanceEx(project).makeRootsChange({}, false , true )
59
65
}
60
66
}
You can’t perform that action at this time.
0 commit comments