Skip to content

Commit

Permalink
[640699] Reduced compound expressions need explicit conversion too.
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar authored and Andrew Jorgensen committed Sep 21, 2010
1 parent fe1653e commit 093a537
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mcs/mcs/assign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ protected override Expression ResolveConversions (ResolveContext ec)
// Otherwise, if the selected operator is a predefined operator
//
Binary b = source as Binary;
if (b == null && source is ReducedExpression)
b = ((ReducedExpression) source).OriginalExpression as Binary;

if (b != null) {
//
// 2a. the operator is a shift operator
Expand Down
10 changes: 10 additions & 0 deletions mcs/mcs/ecore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,16 @@ private ReducedExpression (Expression expr, Expression orig_expr)
this.loc = orig_expr.Location;
}

#region Properties

public Expression OriginalExpression {
get {
return orig_expr;
}
}

#endregion

//
// Creates fully resolved expression switcher
//
Expand Down

0 comments on commit 093a537

Please sign in to comment.