anchor.diff:    ///
     /// TODO(scheglov) this is duplicate
     void _analyzeLeastUpperBound(
  -      Expression node, Expression expr1, Expression expr2,
  -      {bool read = false}) {
  -    DartType staticType1 = _getExpressionType(expr1, read: read);
  -    DartType staticType2 = _getExpressionType(expr2, read: read);
  +      Expression node, Expression expr1, Expression expr2) {
  +    DartType staticType1 = getReadType(expr1);
  +    DartType staticType2 = getReadType(expr2);
   
       _analyzeLeastUpperBoundTypes(node, staticType1, staticType2);
     }
  
positive.code:       );
        _inferenceHelper.recordStaticType(node, type);
  
        var leftWriteType = _getStaticType2(node.leftHandSide);
        if (!_typeSystem.isAssignableTo2(type, leftWriteType)) {
          _resolver.errorReporter.reportErrorForNode(
            CompileTimeErrorCode.INVALID_ASSIGNMENT,
  
negative.code:     }
      return false;
    }
  
    /// The type of the RHS assigned to [left] must be subtype of the return.
    static DartType _getWriteType(Expression left) {
      // We are writing, so ignore promotions.
      if (left is SimpleIdentifier) {
        var element = left.staticElement;
        if (element is PromotableElement) {
          return element.type;
        }
      }
  
      return left.staticType;
    }
  }
  
  class AssignmentExpressionShared {
  