IR: .isBound API for F/O declarations
Fake override functions and properties may not be bound to symbols. This API allows to know if such declaration is actually bound
This commit is contained in:
committed by
teamcityserver
parent
6c734289be
commit
76f0684d7c
+5
-1
@@ -75,7 +75,11 @@ internal class PersistentIrFakeOverrideFunction(
|
||||
private var _symbol: IrSimpleFunctionSymbol? = null
|
||||
|
||||
override val symbol: IrSimpleFunctionSymbol
|
||||
get() = _symbol ?: error("$this has not acquired a symbol yet")
|
||||
get() = _symbol ?:
|
||||
error("$this has not acquired a symbol yet")
|
||||
|
||||
override val isBound: Boolean
|
||||
get() = _symbol != null
|
||||
|
||||
@ObsoleteDescriptorBasedAPI
|
||||
override val descriptor
|
||||
|
||||
+3
@@ -80,6 +80,9 @@ internal class PersistentIrFakeOverrideProperty(
|
||||
override val descriptor
|
||||
get() = _symbol?.descriptor ?: this.toIrBasedDescriptor()
|
||||
|
||||
override val isBound: Boolean
|
||||
get() = _symbol != null
|
||||
|
||||
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
||||
override fun acquireSymbol(symbol: IrPropertySymbol): IrProperty {
|
||||
assert(_symbol == null) { "$this already has symbol _symbol" }
|
||||
|
||||
Reference in New Issue
Block a user