Skip to content

getAssignmentLhsIfUnwrappable

fun PsiElement.getAssignmentLhsIfUnwrappable(): PsiElement?

Returns the operand this operation applies to, but only when that operand is wrapped in parentheses, a label, or annotations; returns null otherwise.

The operand is the left-hand side of an assignment or augmented-assignment operator call ((x) = ..., (x) += ...), the base of a postfix increment or decrement ((x)++), or the operand of a prefix increment or decrement (++(x)).

This should only be called for a source element corresponding to one of those constructs.