Use JvmMetadataVersion where appropriate instead of bytecode version
This commit is contained in:
+5
-5
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.load.java.components
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.load.java.JvmBytecodeBinaryVersion
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmMetadataVersion
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.serialization.deserialization.BinaryVersion
|
||||
import org.jetbrains.kotlin.serialization.deserialization.ErrorReporter
|
||||
@@ -29,14 +29,14 @@ object RuntimeErrorReporter : ErrorReporter {
|
||||
throw IllegalStateException("Incomplete hierarchy for class ${descriptor.name}, unresolved classes $unresolvedSuperClasses")
|
||||
}
|
||||
|
||||
override fun reportIncompatibleAbiVersion(classId: ClassId, filePath: String, actualVersion: BinaryVersion) {
|
||||
throw IllegalStateException("Incompatible ABI version of $classId: $actualVersion " +
|
||||
"(expected version is ${JvmBytecodeBinaryVersion.INSTANCE})")
|
||||
override fun reportIncompatibleMetadataVersion(classId: ClassId, filePath: String, actualVersion: BinaryVersion) {
|
||||
throw IllegalStateException("Incompatible binary version of $classId: $actualVersion " +
|
||||
"(expected version is ${JvmMetadataVersion.INSTANCE})")
|
||||
}
|
||||
|
||||
override fun reportCannotInferVisibility(descriptor: CallableMemberDescriptor) {
|
||||
// TODO: use DescriptorRenderer
|
||||
throw IllegalStateException("Cannot infer visibility for class ${descriptor.name}")
|
||||
throw IllegalStateException("Cannot infer visibility for $descriptor")
|
||||
}
|
||||
|
||||
override fun reportLoadingError(message: String, exception: Exception?) {
|
||||
|
||||
Reference in New Issue
Block a user