Introduce language version 2.0 and associate K2 compiler with it

This commit is contained in:
Mikhail Glukhikh
2022-11-28 18:20:10 +01:00
parent afe1150aec
commit 3dc05f4ec5
84 changed files with 233 additions and 151 deletions
@@ -643,7 +643,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
}
}
private fun checkLanguageVersionIsStable(languageVersion: LanguageVersion, collector: MessageCollector) {
fun checkLanguageVersionIsStable(languageVersion: LanguageVersion, collector: MessageCollector) {
if (!languageVersion.isStable && !suppressVersionWarnings) {
collector.report(
CompilerMessageSeverity.STRONG_WARNING,
@@ -573,7 +573,7 @@ Also sets `-jvm-target` value equal to the selected JDK version"""
result[JvmAnalysisFlags.sanitizeParentheses] = sanitizeParentheses
result[JvmAnalysisFlags.suppressMissingBuiltinsError] = suppressMissingBuiltinsError
result[JvmAnalysisFlags.enableJvmPreview] = enableJvmPreview
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useK2
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useK2 || languageVersion.usesK2
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
result[JvmAnalysisFlags.useIR] = !useOldBackend
return result