Skip to content

Commit

Permalink
Removing un-necessary fields from deconstruction bound nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Aug 16, 2016
1 parent da1522c commit 8b11bba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/Binder_Deconstruct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ private BoundDeconstructionConstructionStep MakeDeconstructionConstructionStep(C
var outputPlaceholder = new BoundDeconstructValuePlaceholder(node, tuple) { WasCompilerGenerated = true };

BoundExpression construction = new BoundTupleLiteral(node, default(ImmutableArray<string>), constructionInputs.CastArray<BoundExpression>(), tuple);
return new BoundDeconstructionConstructionStep(node, construction, constructionInputs, outputPlaceholder);
return new BoundDeconstructionConstructionStep(node, construction, outputPlaceholder);
}

/// <summary>
Expand Down Expand Up @@ -473,7 +473,7 @@ private BoundDeconstructionAssignmentStep MakeDeconstructionAssignmentStep(
// each assignment has a placeholder for a receiver and another for the source
BoundAssignmentOperator op = BindAssignment(receivingVariable.Syntax, outputPlaceholder, inputPlaceholder, diagnostics);

return new BoundDeconstructionAssignmentStep(node, op, inputPlaceholder, outputPlaceholder);
return new BoundDeconstructionAssignmentStep(node, op, outputPlaceholder);
}

private static ImmutableArray<BoundExpression> FlattenDeconstructVariables(ArrayBuilder<DeconstructionVariable> variables)
Expand Down
2 changes: 0 additions & 2 deletions src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,11 @@

<Node Name="BoundDeconstructionAssignmentStep" Base="BoundNode">
<Field Name="Assignment" Type="BoundAssignmentOperator" Null="disallow"/>
<Field Name="InputPlaceholder" Type="BoundDeconstructValuePlaceholder" Null="disallow"/>
<Field Name="OutputPlaceholder" Type="BoundDeconstructValuePlaceholder" Null="disallow"/>
</Node>

<Node Name="BoundDeconstructionConstructionStep" Base="BoundNode">
<Field Name="Construct" Type="BoundExpression" Null="disallow"/>
<Field Name="InputPlaceholders" Type="ImmutableArray&lt;BoundDeconstructValuePlaceholder&gt;"/>
<Field Name="OutputPlaceholder" Type="BoundDeconstructValuePlaceholder" Null="disallow"/>
</Node>

Expand Down

0 comments on commit 8b11bba

Please sign in to comment.