K2 tests: always use language version 2.0 or higher

This commit is contained in:
Mikhail Glukhikh
2023-03-02 10:52:16 +01:00
committed by Space Team
parent d9a6cad5ab
commit fbea09b3b6
2 changed files with 11 additions and 2 deletions
@@ -334,7 +334,11 @@ class ModuleStructureExtractorImpl(
moduleDirectives.forEach { it.checkDirectiveApplicability(contextIsGlobal = isImplicitModule, contextIsModule = true) }
val targetBackend = currentModuleTargetBackend ?: defaultsProvider.defaultTargetBackend
currentModuleLanguageVersionSettingsBuilder.configureUsingDirectives(moduleDirectives, environmentConfigurators, targetBackend)
val frontendKind = currentModuleFrontendKind ?: defaultsProvider.defaultFrontend
currentModuleLanguageVersionSettingsBuilder.configureUsingDirectives(
moduleDirectives, environmentConfigurators, targetBackend, useK2 = frontendKind == FrontendKinds.FIR
)
val moduleName = currentModuleName
?: testServices.defaultDirectives[ModuleStructureDirectives.MODULE].firstOrNull()
?: DEFAULT_MODULE_NAME