Skip to content

KaDataFlowProvider

@SubclassOptInRequired(markerClass = [KaSessionComponentImplementationDetail::class])
interface KaDataFlowProvider : KaSessionComponent

Inheritors

Properties

implicitReceiverSmartCasts

The list of implicit receiver smart casts which have refined the expression's implicit receivers to a more specific type. These smart casts are required for the expression to be evaluated. The list does not include smart casts for explicit receivers.

Example

if (this is String) {
  this.substring()   // 'this' receiver is explicit, so there is no implicit smart cast here.

  smartcast()        // 'this' receiver is implicit, therefore there is an implicit smart cast involved.
}

smartCastInfo

Smart cast information for the given KtExpression, or null if smart casts are not applied to it.

token

abstract val token: KaLifetimeToken

The KaLifetimeToken which determines the lifetime of the lifetime owner.

Functions

assertIsValidAndAccessible

computeExitPointSnapshot

isValid

Whether the lifetime owner is still valid, i.e. we are still in the scope of the lifetime owner's regular lifetime.

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.