Skip to content

Commit

Permalink
Alternative approach binding IntoVariable inspired by @AnthonyDGreen
Browse files Browse the repository at this point in the history
…`CaseType` prototype.

** Note need test cases adding_ **
  • Loading branch information
AdamSpeight2008 committed Feb 20, 2021
1 parent 377056e commit d4d92cf
Show file tree
Hide file tree
Showing 20 changed files with 553 additions and 172 deletions.
268 changes: 244 additions & 24 deletions src/Compilers/VisualBasic/Portable/Binding/Binder_Expressions.vb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Compilers/VisualBasic/Portable/BoundTree/BoundNodes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@

<Node Name="BoundExpressionIntoVariable" Base="BoundExpression">
<Field Name="Expression" Type="BoundExpression" />
<Field Name="Variable" Type="BoundExpression" />
<Field Name="Variable" Type="LocalSymbol" />
<Field Name="ConditionOpt" Type="BoundExpression" Null="allow" />
</Node>

<AbstractNode Name="BoundStatement" Base="BoundNode"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/VisualBasic/Portable/BoundTree/Expression.vb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Partial Friend Class BoundExpressionIntoVariable
Protected Overrides ReadOnly Property Children As ImmutableArray(Of BoundNode)
Get
Return ImmutableArray.Create(Of BoundNode)(Me.Expression, Me.Variable)
Return ImmutableArray.Create(Of BoundNode)(Me.Expression)
End Get
End Property
End Class
Expand Down
2 changes: 2 additions & 0 deletions src/Compilers/VisualBasic/Portable/Errors/Errors.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2037,5 +2037,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
FEATURE_CommentsAfterLineContinuation
FEATURE_TypeOfMany
FEATURE_IntoVariable
ERR_UnnecessaryNullableType
ERR_NoConversion
End Enum
End Namespace

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4d92cf

Please sign in to comment.