From b63c6e63ba659b26c8af9143a1bd8da2b754d0fa Mon Sep 17 00:00:00 2001 From: Manish Vasani Date: Tue, 5 Sep 2017 10:32:32 -0700 Subject: [PATCH] Fix build break --- .../VisualBasicOperationFactory_QueryLambdaRewriter.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb b/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb index 639c690ce5afc..81002291a4770 100644 --- a/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb +++ b/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb @@ -65,9 +65,9 @@ Namespace Microsoft.CodeAnalysis.Semantics _uniqueNodes = New HashSet(Of BoundExpression) End Sub - Private Function HandleNode(Of T As BoundExpression)(node As T) As T + Private Function HandleNode(Of T As BoundExpression)(node As T, cloneNode As Func(Of T, T)) As T If Not _uniqueNodes.Add(node) Then - node = node.MemberwiseClone(Of T) + node = cloneNode(node) _uniqueNodes.Add(node) End If @@ -76,17 +76,17 @@ Namespace Microsoft.CodeAnalysis.Semantics Public Overrides Function VisitParameter(node As BoundParameter) As BoundNode node = DirectCast(MyBase.VisitParameter(node), BoundParameter) - Return HandleNode(node) + Return HandleNode(node, cloneNode:=Function(n) New BoundParameter(node.Syntax, node.ParameterSymbol, node.IsLValue, node.SuppressVirtualCalls, node.Type, node.HasErrors)) End Function Public Overrides Function VisitCall(node As BoundCall) As BoundNode node = DirectCast(MyBase.VisitCall(node), BoundCall) - Return HandleNode(node) + Return HandleNode(node, cloneNode:=Function(n) New BoundCall(node.Syntax, node.Method, node.MethodGroupOpt, node.ReceiverOpt, node.Arguments, node.ConstantValueOpt, node.IsLValue, node.SuppressObjectClone, node.Type, node.HasErrors)) End Function Public Overrides Function VisitPropertyAccess(node As BoundPropertyAccess) As BoundNode node = DirectCast(MyBase.VisitPropertyAccess(node), BoundPropertyAccess) - Return HandleNode(node) + Return HandleNode(node, cloneNode:=Function(n) New BoundPropertyAccess(node.Syntax, node.PropertySymbol, node.PropertyGroupOpt, node.AccessKind, node.IsWriteable, node.IsLValue, node.ReceiverOpt, node.Arguments, node.Type, node.HasErrors)) End Function End Class End Class