Report incomplete hierarchy error
This is the case when you reference a Java class in Kotlin whose superclass is not resolved. Previously this fact was swallowed by LazyJavaClassDescriptor leading to mysterious compilation errors #KT-5129 Fixed
This commit is contained in:
+5
@@ -20,12 +20,17 @@ import org.jetbrains.kotlin.load.java.components.ErrorReporter
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinaryClass
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
|
||||
class LoggingErrorReporter(private val log: Logger) : ErrorReporter {
|
||||
override fun reportLoadingError(message: String, exception: Exception?) {
|
||||
log.error(message, exception)
|
||||
}
|
||||
|
||||
override fun reportIncompleteHierarchy(descriptor: ClassDescriptor, unresolvedSuperClasses: List<String>) {
|
||||
log.error("Incomplete hierarchy for $descriptor. Super classes are not found: $unresolvedSuperClasses")
|
||||
}
|
||||
|
||||
override fun reportCannotInferVisibility(descriptor: CallableMemberDescriptor) {
|
||||
log.error("Could not infer visibility for $descriptor")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user