Skip to content

Commit

Permalink
PR feedback (5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Jun 7, 2016
1 parent 4e531c6 commit 87ee4f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1852,8 +1852,8 @@ static private BoundDeconstructionDeconstructStep MakeNonTupleDeconstructStep(

private class DeconstructionVariable
{
public BoundExpression Single;
public ImmutableArray<DeconstructionVariable> Nested;
public readonly BoundExpression Single;
public readonly ImmutableArray<DeconstructionVariable> Nested;

public DeconstructionVariable(BoundExpression variable)
{
Expand All @@ -1867,7 +1867,7 @@ public DeconstructionVariable(ImmutableArray<DeconstructionVariable> variables)
Nested = variables;
}

public bool IsNested => Nested != default(ImmutableArray<DeconstructionVariable>);
public bool IsNested => !Nested.IsDefault;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override BoundNode VisitDeconstructionAssignmentOperator(BoundDeconstruct
var placeholders = ArrayBuilder<BoundValuePlaceholderBase>.GetInstance();

// evaluate left-hand-side side-effects
var lhsTemps = LeftHandSideSideEffects(node.LeftVariables, temps, stores);
var lhsTargets = LeftHandSideSideEffects(node.LeftVariables, temps, stores);

// get or make right-hand-side values
BoundExpression loweredRight = VisitExpression(node.Right);
Expand All @@ -44,7 +44,7 @@ public override BoundNode VisitDeconstructionAssignmentOperator(BoundDeconstruct
{
// lower the assignment and replace the placeholders for its outputs in the process
var assignmentInfo = node.AssignmentSteps[i];
AddPlaceholderReplacement(assignmentInfo.OutputPlaceholder, lhsTemps[i]);
AddPlaceholderReplacement(assignmentInfo.OutputPlaceholder, lhsTargets[i]);

var assignment = VisitExpression(assignmentInfo.Assignment);

Expand Down

0 comments on commit 87ee4f4

Please sign in to comment.