Do not emit pre-release flag if -Xskip-metadata-version-check is used

The -Xskip-metadata-version-check command line argument is supposed to be used
to avoid getting errors only; the side effect that it also caused compiler to
write the pre-release flag to binaries was a mistake and is fixed now
This commit is contained in:
Alexander Udalov
2017-01-11 16:45:51 +03:00
parent 8f9ce5d0f2
commit edb4fd1dfd
2 changed files with 3 additions and 4 deletions
@@ -74,7 +74,9 @@ class DeserializedDescriptorResolver {
}
private val KotlinJvmBinaryClass.isPreReleaseInvisible: Boolean
get() = !IS_PRE_RELEASE && (classHeader.isPreRelease || classHeader.metadataVersion == KOTLIN_1_1_EAP_METADATA_VERSION)
get() = !JvmMetadataVersion.skipCheck &&
!IS_PRE_RELEASE &&
(classHeader.isPreRelease || classHeader.metadataVersion == KOTLIN_1_1_EAP_METADATA_VERSION)
internal fun readData(kotlinClass: KotlinJvmBinaryClass, expectedKinds: Set<KotlinClassHeader.Kind>): Array<String>? {
val header = kotlinClass.classHeader