private void highlightInvalidWriteAccess(@NotNull GroovyControlFlow flow,
                                               @NotNull Set<GrVariable> variables,
                                               @NotNull Set<GrVariable> initializedVariables) {
        final List<ReadWriteVariableInstruction> result =
          InvalidWriteAccessSearcher.findInvalidWriteAccess(flow, variables, initializedVariables);

        if (result == null) return;

        for (final ReadWriteVariableInstruction instruction : result) {
          int descriptor = instruction.getDescriptor();

          if (!(flow.getVarIndices()[descriptor] instanceof ResolvedVariableDescriptor)) continue;
          PsiElement element = instruction.getElement();
          if (variables.contains(((ResolvedVariableDescriptor)flow.getVarIndices()[descriptor]).getVariable()) && element != null) {
            registerError(element,
                          GroovyBundle.message("cannot.assign.a.value.to.final.field.0", descriptor),
                          LocalQuickFix.EMPTY_ARRAY, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
          }
        }
      }
private void highlightInvalidWriteAccess(@NotNull GroovyControlFlow flow,
                                               @NotNull Set<GrVariable> variables,
                                               @NotNull Set<GrVariable> initializedVariables)