anchor.diff:        node.elseExpression = tmp;
       }
   
  +    // x ? y : x ==> x && y
  +    if (isSameVariable(node.condition, node.elseExpression)) {
  +      destroyVariableUse(node.elseExpression);
  +      return new LogicalOperator.and(node.condition, node.thenExpression);
  +    }
  +    // x ? x : y ==> x || y
  +    if (isSameVariable(node.condition, node.thenExpression)) {
  +      destroyVariableUse(node.thenExpression);
  +      return new LogicalOperator.or(node.condition, node.elseExpression);
  +    }
  +
       return node;
     }
   
  
positive.code:       return new LogicalOperator.or(e1, e2);
      }
    }
  }
  
  
negative.code:         e.elseExpression = (e.elseExpression as Not).operand;
          return new Not(e);
        }
  
        // x ? y : x ==> x && y
        if (isSameVariable(e.condition, e.elseExpression)) {
          destroyVariableUse(e.elseExpression);
          return new LogicalOperator.and(e.condition, e.thenExpression);
        }
        // x ? x : y ==> x || y
        if (isSameVariable(e.condition, e.thenExpression)) {
          destroyVariableUse(e.thenExpression);
          return new LogicalOperator.or(e.condition, e.elseExpression);
        }
  
        return e;
      }
      if (e is Constant && e.value.isBool) {
  