Support reading binary metadata of the next major release

Already existing tests testRequireKotlinInNestedClassesAgainst14{,Js}
now check that there's no error when loading a module/class with
metadata version 1.4.0

 #KT-25972 Fixed
This commit is contained in:
Alexander Udalov
2018-08-17 19:25:01 +02:00
parent 852760b3b0
commit 59e2101a25
5 changed files with 14 additions and 9 deletions
@@ -12,9 +12,9 @@ import org.jetbrains.kotlin.metadata.deserialization.BinaryVersion
* This version includes the version of the core protobuf messages (metadata.proto) as well as JVM extensions (jvm_metadata.proto).
*/
class JvmMetadataVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
// NOTE: 1.1 is incompatible with 1.0 and hence with any other version except 1.1.*
// NOTE: 1.1 is incompatible with 1.0
override fun isCompatible() =
this.major == 1 && this.minor == 1
isMetadataVersionCompatible() && minor != 0
companion object {
@JvmField