@Override
 public void visit(Tree.AssignmentOp that) {
   super.visit(that);
   if (that.getLeftTerm() instanceof Tree.MemberOrTypeExpression) {
     Declaration d = ((Tree.MemberOrTypeExpression) that.getLeftTerm()).getDeclaration();
     if (notResultRef(d) && hasOuterRefs(d, scope, statements)) {
       problem = "an assignment to a declaration used or defined elsewhere";
     }
   }
 }
Пример #2
0
 @Override
 public void visit(Tree.AssignmentOp that) {
   super.visit(that);
   checkVariable(that.getLeftTerm(), that);
 }