Kotlin Analysis API Documentation Help

KaVariableAccessCall

KaVariableAccessCall represents a simple access to a variable or property within Kotlin code — reading or writing the value.

Hierarchy

Inherits KaSingleCall. (For historical reasons it also inherits the legacy KaCallableMemberCall; new code should treat KaVariableAccessCall as a KaSingleCall and use the inline accessors documented there.)

Members

In addition to the KaSingleCall members, KaVariableAccessCall adds the access kind and a context-sensitive-resolution flag.

val kind: Kind

The kind of access — Kind.Read or Kind.Write (with Write.value: KtExpression? exposing the right-hand side of the assignment).

val isContextSensitive: Boolean

Whether the call was resolved using the context-sensitive resolution feature.

Kind

Sealed:

Kind.Read

The variable is being read.

Kind.Write

The variable is being written. value: KtExpression? is the new value; null only if the assignment is incomplete and lacks the new value in source code.

19 May 2026