Do not report pre-release errors if release LV is used in pre-release compiler

This commit effectively reverts
d386712903.

The reason is that when using a release language version, you can only
"see" the subset of a pre-release library which consists of released and
supported features, so reporting an error is not helpful there. Also, it
presents a problem currently when using kotlinc 1.3 (which is
pre-release) with language version 1.2 (stable) against the bundled
stdlib of version 1.3 (pre-release)

 #KT-21267 Declined
This commit is contained in:
Alexander Udalov
2018-08-20 18:05:45 +02:00
parent 4e496cf2b2
commit f6571effcc
3 changed files with 4 additions and 10 deletions
@@ -271,7 +271,7 @@ class LanguageVersionSettingsImpl @JvmOverloads constructor(
}
}
override fun isPreRelease(): Boolean = languageVersion.isPreRelease() ||
override fun isPreRelease(): Boolean = KotlinCompilerVersion.isPreRelease() ||
specificFeatures.any { (feature, state) ->
state == LanguageFeature.State.ENABLED && feature.forcesPreReleaseBinariesIfEnabled()
}