KaCallableSignature¶
sealed interface KaCallableSignature<out S : KaCallableSymbol> : KaLifetimeOwner
A use-site signature for a callable symbol. Compared to the symbol, the signature carries additional use-site type information.
The equality of KaCallableSignature is derived from its content.
Example¶
The callable symbol for get has the type (Int) -> T where T is the type parameter declared in List. On the other hand, a KaCallableSignature for l.get carries the instantiated type information (Int) -> String.
Inheritors¶
Properties¶
callableId¶
open val callableId: CallableId?
The CallableId of the signature, corresponding to the symbol's callable ID.
contextParameters¶
The use-site-substituted context parameters.
receiverType¶
abstract val receiverType: KaType?
The use-site-substituted extension receiver type.
returnType¶
abstract val returnType: KaType
The use-site-substituted return type.
symbol¶
The underlying symbol which the signature carries use-site information about.
token¶
abstract val token: KaLifetimeToken
The KaLifetimeToken which determines the lifetime of the lifetime owner.
Functions¶
assertIsValidAndAccessible¶
inline fun KaLifetimeOwner.assertIsValidAndAccessible()
equals¶
hashCode¶
isValid¶
fun KaLifetimeOwner.isValid(): Boolean
Whether the lifetime owner is still valid, i.e. we are still in the scope of the lifetime owner's regular lifetime.
substitute¶
abstract fun substitute(substitutor: KaSubstitutor): KaCallableSignature<S>
Applies the given substitutor to the signature, returning a new signature with substituted types.
See also
withValidityAssertion¶
inline fun <R> KaLifetimeOwner.withValidityAssertion(action: () -> R): R
Executes action only if the KaLifetimeOwner is still valid and accessible. Otherwise, throws a validity exception based on the concrete violation.