Skip to content

KaTypePointer

KaTypePointer allows to point to a KaType and later retrieve it in another KaSession. A pointer is necessary because KaTypes cannot be shared past the boundaries of the KaSession they were created in, as they are valid only there.

See also

Functions

restore

abstract fun restore(session: KaSession): T?

Returns the restored KaType (possibly a new type instance) if the pointer is still valid, or null otherwise.

Do not use this function directly, as it is an implementation detail. Use KaSession.restore instead.

restore

context(session: KaSession)
fun <T : KaType> KaTypePointer<T>.restore(): T?

Returns the restored KaType (possibly a new type instance) if the pointer is still valid, or null otherwise.