コード例 #1
0
 /**
  * @see
  *     org.eclipse.jdt.internal.compiler.ast.BinaryExpression#resolveType(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
  */
 public TypeBinding resolveType(BlockScope scope) {
   TypeBinding result = super.resolveType(scope);
   // check whether comparing identical expressions
   Binding leftDirect = Expression.getDirectBinding(this.left);
   if (leftDirect != null && leftDirect == Expression.getDirectBinding(this.right)) {
     if (!(this.right instanceof Assignment))
       scope.problemReporter().comparingIdenticalExpressions(this);
   }
   return result;
 }
コード例 #2
0
 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
   for (int i = 0, max = dimensions.length; i < max; i++) {
     Expression dim;
     if ((dim = dimensions[i]) != null) {
       flowInfo = dim.analyseCode(currentScope, flowContext, flowInfo);
     }
   }
   if (initializer != null) {
     return initializer.analyseCode(currentScope, flowContext, flowInfo);
   }
   return flowInfo;
 }