IR: don't store isPublic as field in IdSignature

This commit is contained in:
Alexander Udalov
2020-06-10 21:50:44 +02:00
parent 3154eca218
commit d8aee421ac
2 changed files with 8 additions and 6 deletions
@@ -47,7 +47,7 @@ sealed class IdSignature {
}
class PublicSignature(val packageFqName: String, val declarationFqName: String, val id: Long?, val mask: Long) : IdSignature() {
override val isPublic = true
override val isPublic: Boolean get() = true
override fun packageFqName(): FqName = FqName(packageFqName)
@@ -96,7 +96,7 @@ sealed class IdSignature {
}
class AccessorSignature(val propertySignature: IdSignature, val accessorSignature: PublicSignature) : IdSignature() {
override val isPublic: Boolean = true
override val isPublic: Boolean get() = true
override fun topLevelSignature() = propertySignature.topLevelSignature()
@@ -119,7 +119,7 @@ sealed class IdSignature {
}
class FileLocalSignature(val container: IdSignature, val id: Long) : IdSignature() {
override val isPublic = false
override val isPublic: Boolean get() = false
override fun packageFqName(): FqName = container.packageFqName()
@@ -144,9 +144,9 @@ sealed class IdSignature {
// Used to reference local variable and value parameters in function
class ScopeLocalDeclaration(val id: Int, val description: String = "<no description>") : IdSignature() {
override val isPublic: Boolean = false
override val isPublic: Boolean get() = false
override val hasTopLevel: Boolean = false
override val hasTopLevel: Boolean get() = false
override fun topLevelSignature(): IdSignature = error("Is not supported for Local ID")
@@ -9,7 +9,9 @@ import org.jetbrains.kotlin.backend.common.LoggingContext
import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideBuilderImpl
import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideControl
import org.jetbrains.kotlin.backend.common.serialization.encodings.BinarySymbolData
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.descriptors.impl.EmptyPackageFragmentDescriptor
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.declarations.IrDeclaration