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:
committed by
Ilya Gorbunov
parent
02a9b03007
commit
927706883e
@@ -45,7 +45,7 @@ class JvmModuleProtoBufTest : KtUsefulTestCase() {
|
||||
"-d", tmpdir.path,
|
||||
"-module-name", moduleName,
|
||||
"-language-version", compileWith.versionString
|
||||
) + extraOptions + listOfNotNull("-Xskip-metadata-version-check".takeIf { KotlinCompilerVersion.isPreRelease() }))
|
||||
) + extraOptions)
|
||||
|
||||
val mapping = ModuleMapping.loadModuleMapping(
|
||||
File(tmpdir, "META-INF/$moduleName.${ModuleMapping.MAPPING_FILE_EXT}").readBytes(), "test",
|
||||
|
||||
@@ -275,7 +275,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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user