Add 'isBound' property to IrSymbol
This commit is contained in:
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.ir.declarations.*
|
|||||||
interface IrSymbol {
|
interface IrSymbol {
|
||||||
val owner : IrSymbolOwner
|
val owner : IrSymbolOwner
|
||||||
val descriptor: DeclarationDescriptor
|
val descriptor: DeclarationDescriptor
|
||||||
|
val isBound: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IrBindableSymbol<out D : DeclarationDescriptor, B : IrSymbolOwner> : IrSymbol {
|
interface IrBindableSymbol<out D : DeclarationDescriptor, B : IrSymbolOwner> : IrSymbol {
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ abstract class IrBindableSymbolBase<out D : DeclarationDescriptor, B : IrSymbolO
|
|||||||
else
|
else
|
||||||
throw IllegalStateException("Symbol for $descriptor is already bound")
|
throw IllegalStateException("Symbol for $descriptor is already bound")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val isBound: Boolean
|
||||||
|
get() = _owner != null
|
||||||
}
|
}
|
||||||
|
|
||||||
class IrFileSymbolImpl(descriptor: PackageFragmentDescriptor) :
|
class IrFileSymbolImpl(descriptor: PackageFragmentDescriptor) :
|
||||||
|
|||||||
Reference in New Issue
Block a user