commonMain.co.touchlab.skie.kir.irbuilder.impl.symboltable.IrBaseRebindablePublicSymbol.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-compiler-linker-plugin-kgp_1.9.20 Show documentation
Show all versions of kotlin-compiler-linker-plugin-kgp_1.9.20 Show documentation
Kotlin compiler plugin that improves Swift interface of a Kotlin Multiplatform framework.
The newest version!
package co.touchlab.skie.kir.irbuilder.impl.symboltable
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.ir.declarations.IrSymbolOwner
import org.jetbrains.kotlin.ir.symbols.IrBindableSymbol
import org.jetbrains.kotlin.ir.symbols.impl.IrPublicSymbolBase
import org.jetbrains.kotlin.ir.util.IdSignature
abstract class IrBaseRebindablePublicSymbol(
signature: IdSignature,
descriptor: D,
) : IrBindableSymbol, IrPublicSymbolBase(signature, descriptor) {
private var _owner: B? = null
override val owner: B
get() = _owner ?: throw IllegalStateException("Symbol is not bound")
override fun bind(owner: B) {
this._owner = owner
}
fun unbind() {
this._owner = null
}
override val isBound: Boolean
get() = _owner != null
override var privateSignature: IdSignature? = null
}