writeElement property
Element?
get
writeElement
The element that is used to write the result, or null
if the AST
structure hasn't been resolved, or if the target couldn't be resolved.
In valid code this is a LocalVariableElement, ParameterElement, or a PropertyAccessorElement setter.
In invalid code, for recovery, we might use other elements, for example a
PropertyAccessorElement getter myGetter = 0
even though the getter
can't be used to write a value. We do this to help the user to navigate
to the getter, and maybe add the corresponding setter.
If this node is a compound assignment, e. g. x += 2
, both readElement
and writeElement could be non-null
.
Implementation
Element? get writeElement;