IR: remove KotlinIrLinker.checkAccessibility

This sanity check conflicted with cases where visibility test is
suppressed in the frontend.
This commit is contained in:
Georgy Bronnikov
2020-01-28 12:10:11 +03:00
parent 678c74b17f
commit e351d560d6
3 changed files with 0 additions and 19 deletions
@@ -527,7 +527,6 @@ abstract class KotlinIrLinker(
protected abstract fun readFile(moduleDescriptor: ModuleDescriptor, fileIndex: Int): ByteArray
protected abstract fun readFileCount(moduleDescriptor: ModuleDescriptor): Int
protected abstract fun checkAccessibility(declarationDescriptor: DeclarationDescriptor): Boolean
protected open fun handleNoModuleDeserializerFound(key: UniqId): DeserializationState<*> {
error("Deserializer for declaration $key is not found")
}
@@ -556,10 +555,6 @@ abstract class KotlinIrLinker(
//
if (!topLevelDescriptor.shouldBeDeserialized()) return null
require(checkAccessibility(topLevelDescriptor)) {
"Locally accessible declarations should not be accessed here $topLevelDescriptor"
}
if (topLevelDescriptor !is DeserializedClassDescriptor && topLevelDescriptor !is DeserializedCallableMemberDescriptor) {
return null
}