// Must be local or parameter.
ElementKind kind = element.getKind();
if (kind == ElementKind.LOCAL_VARIABLE) {
node.setStaticElement(element);
if (node.inSetterContext()) {
LocalVariableElementImpl variableImpl = (LocalVariableElementImpl) element;
variableImpl.markPotentiallyMutatedInScope();
if (!ObjectUtilities.equals(element.getEnclosingElement(), enclosingFunction)) {
variableImpl.markPotentiallyMutatedInClosure();
}
}
} else if (kind == ElementKind.PARAMETER) {
node.setStaticElement(element);
if (node.inSetterContext()) {