コード例 #1
0
 @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);
 }