diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/QueryTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/QueryTests.cs index 2106676c0a985bf6244a22430d336f55ccdb3579..9175930d7c46a728c0db87ad879372f9593a3eb3 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/QueryTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/QueryTests.cs @@ -3958,5 +3958,99 @@ static void Main() VerifyOperationTreeAndDiagnosticsForTest(source, expectedOperationTree, expectedDiagnostics); } + + [CompilerTrait(CompilerFeature.IOperation)] + [Fact, WorkItem(17838, "https://github.com/dotnet/roslyn/issues/17838")] + public void IOperationForQueryClause() + { + string source = @" +using System.Collections.Generic; +using System.Linq; + +class Query +{ + public static void Main(string[] args) + { + List c = new List() { 1, 2, 3, 4, 5, 6, 7 }; + var r = from i in c /**/select i + 1/**/; + } +} +"; + string expectedOperationTree = @" +IInvocationExpression (System.Collections.Generic.IEnumerable System.Linq.Enumerable.Select(this System.Collections.Generic.IEnumerable source, System.Func selector)) (OperationKind.InvocationExpression, Type: System.Collections.Generic.IEnumerable) (Syntax: 'select i + 1') + Instance Receiver: null + Arguments(2): + IArgument (ArgumentKind.Explicit, Matching Parameter: source) (OperationKind.Argument) (Syntax: 'from i in c') + IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Collections.Generic.IEnumerable) (Syntax: 'from i in c') + Conversion: CommonConversion (Exists: True, IsIdentity: False, IsNumeric: False, IsReference: True, IsUserDefined: False) (MethodSymbol: null) + Operand: ILocalReferenceExpression: c (OperationKind.LocalReferenceExpression, Type: System.Collections.Generic.List) (Syntax: 'c') + InConversion: null + OutConversion: null + IArgument (ArgumentKind.Explicit, Matching Parameter: selector) (OperationKind.Argument) (Syntax: 'i + 1') + IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Func) (Syntax: 'i + 1') + Conversion: CommonConversion (Exists: True, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) + Operand: IAnonymousFunctionExpression (Symbol: lambda expression) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 'i + 1') + IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 'i + 1') + IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'i + 1') + ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.Add) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 'i + 1') + Left: IOperation: (OperationKind.None) (Syntax: 'i') + Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') + InConversion: null + OutConversion: null +"; + var expectedDiagnostics = DiagnosticDescription.None; + + VerifyOperationTreeAndDiagnosticsForTest(source, expectedOperationTree, expectedDiagnostics); + } + + [CompilerTrait(CompilerFeature.IOperation)] + [Fact, WorkItem(17838, "https://github.com/dotnet/roslyn/issues/17838")] + public void IOperationForRangeVariableDefinition() + { + string source = @" +using System.Collections.Generic; +using System.Linq; + +class Query +{ + public static void Main(string[] args) + { + List c = new List() { 1, 2, 3, 4, 5, 6, 7 }; + var r = /**/from i in c/**/ select i + 1; + } +} +"; + string expectedOperationTree = @" +ILocalReferenceExpression: c (OperationKind.LocalReferenceExpression, Type: System.Collections.Generic.List) (Syntax: 'c') +"; + var expectedDiagnostics = DiagnosticDescription.None; + + VerifyOperationTreeAndDiagnosticsForTest(source, expectedOperationTree, expectedDiagnostics); + } + + [CompilerTrait(CompilerFeature.IOperation)] + [Fact, WorkItem(17838, "https://github.com/dotnet/roslyn/issues/17838")] + public void IOperationForRangeVariableReference() + { + string source = @" +using System.Collections.Generic; +using System.Linq; + +class Query +{ + public static void Main(string[] args) + { + List c = new List() { 1, 2, 3, 4, 5, 6, 7 }; + var r = from i in c select /**/i/**/ + 1; + } +} +"; + string expectedOperationTree = @" +IOperation: (OperationKind.None) (Syntax: 'i') +"; + var expectedDiagnostics = DiagnosticDescription.None; + + VerifyOperationTreeAndDiagnosticsForTest(source, expectedOperationTree, expectedDiagnostics); + } } } diff --git a/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs b/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs index 93a3bd23f8120271ae6725cae3f57721f132bb66..e56a81abb0c9acd003247ce0833328e691feaaca 100644 --- a/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs +++ b/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs @@ -5617,8 +5617,11 @@ internal sealed partial class LazyCollectionElementInitializerExpression : BaseC /// /// Represents an unrolled/lowered query expression in C# and VB. - /// For example, for the query expression "from x in set where x.Name != null select x.Name", the select clause is the last clause of the unrolled query expression, - /// with the where clause as one of its descendant, and the from clause as the descendant of the where clause. + /// For example, for the query expression "from x in set where x.Name != null select x.Name", the Operation tree has the following shape: + /// ITranslatedQueryExpression + /// IInvocationExpression ('Select' invocation for "select x.Name") + /// IInvocationExpression ('Where' invocation for "where x.Name != null") + /// IInvocationExpression ('From' invocation for "from x in set") /// internal abstract partial class BaseTranslatedQueryExpression : Operation, ITranslatedQueryExpression { @@ -5650,8 +5653,11 @@ public override void Accept(OperationVisitor visitor) /// /// Represents an unrolled/lowered query expression in C# and VB. - /// For example, for the query expression "from x in set where x.Name != null select x.Name", the select clause is the last clause of the unrolled query expression, - /// with the where clause as one of its descendant, and the from clause as the descendant of the where clause. + /// For example, for the query expression "from x in set where x.Name != null select x.Name", the Operation tree has the following shape: + /// ITranslatedQueryExpression + /// IInvocationExpression ('Select' invocation for "select x.Name") + /// IInvocationExpression ('Where' invocation for "where x.Name != null") + /// IInvocationExpression ('From' invocation for "from x in set") /// internal sealed partial class TranslatedQueryExpression : BaseTranslatedQueryExpression, ITranslatedQueryExpression { @@ -5665,8 +5671,11 @@ internal sealed partial class TranslatedQueryExpression : BaseTranslatedQueryExp /// /// Represents an unrolled/lowered query expression in C# and VB. - /// For example, for the query expression "from x in set where x.Name != null select x.Name", the select clause is the last clause of the unrolled query expression, - /// with the where clause as one of its descendant, and the from clause as the descendant of the where clause. + /// For example, for the query expression "from x in set where x.Name != null select x.Name", the Operation tree has the following shape: + /// ITranslatedQueryExpression + /// IInvocationExpression ('Select' invocation for "select x.Name") + /// IInvocationExpression ('Where' invocation for "where x.Name != null") + /// IInvocationExpression ('From' invocation for "from x in set") /// internal sealed partial class LazyTranslatedQueryExpression : BaseTranslatedQueryExpression, ITranslatedQueryExpression { diff --git a/src/Compilers/Core/Portable/Operations/ITranslatedQueryExpression.cs b/src/Compilers/Core/Portable/Operations/ITranslatedQueryExpression.cs index 2add06935a3e47bb0f8d9827ad080034d1601478..99312f666e2c9a172a0f4d1277c2276c41d29e5f 100644 --- a/src/Compilers/Core/Portable/Operations/ITranslatedQueryExpression.cs +++ b/src/Compilers/Core/Portable/Operations/ITranslatedQueryExpression.cs @@ -4,8 +4,11 @@ namespace Microsoft.CodeAnalysis.Semantics { /// /// Represents an unrolled/lowered query expression in C# and VB. - /// For example, for the query expression "from x in set where x.Name != null select x.Name", the select clause is the last clause of the unrolled query expression, - /// with the where clause as one of its descendant, and the from clause as the descendant of the where clause. + /// For example, for the query expression "from x in set where x.Name != null select x.Name", the Operation tree has the following shape: + /// ITranslatedQueryExpression + /// IInvocationExpression ('Select' invocation for "select x.Name") + /// IInvocationExpression ('Where' invocation for "where x.Name != null") + /// IInvocationExpression ('From' invocation for "from x in set") /// /// /// This interface is reserved for implementation by its associated APIs. We reserve the right to diff --git a/src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_Query.vb b/src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_Query.vb index e7ec42031faf982f5865cebd0787b05491913894..fc6285313fbd500dece4191f7ae2bab81b1623cf 100644 --- a/src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_Query.vb +++ b/src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_Query.vb @@ -49,7 +49,14 @@ Namespace Microsoft.CodeAnalysis.VisualBasic _instrumentTopLevelNonCompilerGeneratedExpressionsInQuery = Not instrumentQueryLambdaBody - Dim returnstmt = RewriteQueryLambdaBody(AddressOf VisitExpressionNode, node, _rangeVariableMap, _instrumenterOpt, instrumentQueryLambdaBody:=instrumentQueryLambdaBody AndAlso Instrument) + Dim rewrittenBody As BoundExpression = VisitExpressionNode(node.Expression) + Dim returnstmt = CreateReturnStatementForQueryLambdaBody(rewrittenBody, node) + + If instrumentQueryLambdaBody AndAlso Instrument Then + returnstmt = _instrumenterOpt.InstrumentQueryLambdaBody(node, returnstmt) + End If + + RemoveRangeVariables(node, _rangeVariableMap) _instrumentTopLevelNonCompilerGeneratedExpressionsInQuery = save_createSequencePointsForTopLevelNonCompilerGeneratedExpressions @@ -90,14 +97,18 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Dim paramRef As New BoundParameter(node.Syntax, parameter, False, - parameter.Type, - hasErrors:=parameter.Type.IsErrorType()) - - If Not paramRef.HasErrors AndAlso isReservedName AndAlso Not String.Equals(parameterName, StringConstants.Group, StringComparison.Ordinal) Then - ' Compound variable. - ' Each range variable is an Anonymous Type property. - Debug.Assert(parameterName.Equals(StringConstants.It) OrElse parameterName.Equals(StringConstants.It1) OrElse parameterName.Equals(StringConstants.It2)) - PopulateRangeVariableMapForAnonymousType(node.Syntax, paramRef, nodeRangeVariables, firstUnmappedRangeVariable, rangeVariableMap, inExpressionLambda) + parameter.Type) + + If isReservedName AndAlso Not String.Equals(parameterName, StringConstants.Group, StringComparison.Ordinal) Then + If parameter.Type.IsErrorType() Then + ' Skip adding to the range variable map for error case. + firstUnmappedRangeVariable += 1 + Else + ' Compound variable. + ' Each range variable is an Anonymous Type property. + Debug.Assert(parameterName.Equals(StringConstants.It) OrElse parameterName.Equals(StringConstants.It1) OrElse parameterName.Equals(StringConstants.It2)) + PopulateRangeVariableMapForAnonymousType(node.Syntax, paramRef, nodeRangeVariables, firstUnmappedRangeVariable, rangeVariableMap, inExpressionLambda) + End If Else ' Simple case, range variable is a lambda parameter. Debug.Assert(IdentifierComparison.Equals(parameterName, nodeRangeVariables(firstUnmappedRangeVariable).Name)) @@ -158,28 +169,21 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Next End Sub - Friend Shared Function RewriteQueryLambdaBody( - expressionRewriter As Func(Of BoundExpression, BoundExpression), - originalNode As BoundQueryLambda, - rangeVariableMap As Dictionary(Of RangeVariableSymbol, BoundExpression), - Optional instrumenterOpt As Instrumenter = Nothing, - Optional instrumentQueryLambdaBody As Boolean = False) As BoundStatement - - Dim returnstmt As BoundStatement = New BoundReturnStatement(originalNode.Syntax, - expressionRewriter(originalNode.Expression), - Nothing, - Nothing) + Friend Shared Function CreateReturnStatementForQueryLambdaBody( + rewrittenBody As BoundExpression, + originalNode As BoundQueryLambda) As BoundStatement - If instrumentQueryLambdaBody Then - returnstmt = instrumenterOpt.InstrumentQueryLambdaBody(originalNode, returnstmt) - End If + Return New BoundReturnStatement(originalNode.Syntax, + rewrittenBody, + Nothing, + Nothing) + End Function + Friend Shared Sub RemoveRangeVariables(originalNode As BoundQueryLambda, rangeVariableMap As Dictionary(Of RangeVariableSymbol, BoundExpression)) For Each rangeVar As RangeVariableSymbol In originalNode.RangeVariables rangeVariableMap.Remove(rangeVar) Next - - Return returnstmt - End Function + End Sub Friend Shared Function RewriteQueryLambda(rewrittenBody As BoundStatement, originalNode As BoundQueryLambda) As BoundLambda Dim lambdaBody = New BoundBlock(originalNode.Syntax, diff --git a/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb b/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb index 81002291a4770b462adc1640955cf52ee377d7b1..058edfcae0fa899a5b7e26043d02544a350dd7f6 100644 --- a/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb +++ b/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_QueryLambdaRewriter.vb @@ -1,6 +1,7 @@ ' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports Microsoft.CodeAnalysis.VisualBasic +Imports Microsoft.CodeAnalysis.VisualBasic.BoundTreeVisitor Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Namespace Microsoft.CodeAnalysis.Semantics @@ -9,11 +10,17 @@ Namespace Microsoft.CodeAnalysis.Semantics ' We rewrite query lambda into regular lambda with 2 passes. ' Pass 1 uses helper methods from LocalRewriter to do the lowering. This introduces large number of DAGs. ' Pass 2 walks over the lowered tree and replaces duplicate bound nodes in the tree with their clones - this is a requirement for the Operation tree. - Dim pass1Rewriter As New QueryLambdaRewriterPass1 - Dim rewrittenLambda As BoundLambda = DirectCast(pass1Rewriter.VisitQueryLambda(node), BoundLambda) + ' Note that the rewriter also rewrites all the query lambdas inside the body of this query lambda. - Dim pass2Rewriter As New QueryLambdaRewriterPass2 - Return pass2Rewriter.VisitLambda(rewrittenLambda) + Try + Dim pass1Rewriter As New QueryLambdaRewriterPass1 + Dim rewrittenLambda As BoundLambda = DirectCast(pass1Rewriter.VisitQueryLambda(node), BoundLambda) + + Dim pass2Rewriter As New QueryLambdaRewriterPass2 + Return pass2Rewriter.VisitLambda(rewrittenLambda) + Catch ex As CancelledByStackGuardException + Return node + End Try End Function Private NotInheritable Class QueryLambdaRewriterPass1 @@ -25,9 +32,11 @@ Namespace Microsoft.CodeAnalysis.Semantics End Sub Public Overrides Function VisitQueryLambda(node As BoundQueryLambda) As BoundNode - LocalRewriter.PopulateRangeVariableMapForQueryLambdaRewrite(node, _rangeVariableMap, inExpressionLambda:=False) - Dim rewrittenBody As BoundStatement = LocalRewriter.RewriteQueryLambdaBody(AddressOf VisitExpressionWithStackGuard, node, _rangeVariableMap) - Return LocalRewriter.RewriteQueryLambda(rewrittenBody, node) + LocalRewriter.PopulateRangeVariableMapForQueryLambdaRewrite(node, _rangeVariableMap, inExpressionLambda:=True) + Dim rewrittenBody As BoundExpression = VisitExpressionWithStackGuard(node.Expression) + Dim rewrittenStatement As BoundStatement = LocalRewriter.CreateReturnStatementForQueryLambdaBody(rewrittenBody, node) + LocalRewriter.RemoveRangeVariables(node, _rangeVariableMap) + Return LocalRewriter.RewriteQueryLambda(rewrittenStatement, node) End Function Public Overrides Function VisitRangeVariable(node As BoundRangeVariable) As BoundNode @@ -39,13 +48,12 @@ Namespace Microsoft.CodeAnalysis.Semantics End If #If DEBUG Then - ' Range variable reference should be rewritten to a parameter reference, or a call or a property access. + ' Range variable reference should be rewritten to a parameter reference or a property access. ' We clone these bound nodes in QueryLambdaRewriterPass2 to avoid dag in the generated bound tree. ' If the LocalRewriter is changed to generate more kind of bound nodes for range variables, we should handle these in QueryLambdaRewriterPass2. ' Below assert helps us to stay in sync with the LocalRewriter. Select Case expression.Kind Case BoundKind.Parameter - Case BoundKind.Call Case BoundKind.PropertyAccess Exit Select Case Else @@ -59,34 +67,16 @@ Namespace Microsoft.CodeAnalysis.Semantics Private NotInheritable Class QueryLambdaRewriterPass2 Inherits BoundTreeRewriterWithStackGuard - Private ReadOnly _uniqueNodes As HashSet(Of BoundExpression) - - Public Sub New() - _uniqueNodes = New HashSet(Of BoundExpression) - End Sub - - 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 = cloneNode(node) - _uniqueNodes.Add(node) - End If - - Return node - End Function + Private ReadOnly _uniqueNodes As New HashSet(Of BoundParameter) Public Overrides Function VisitParameter(node As BoundParameter) As BoundNode node = DirectCast(MyBase.VisitParameter(node), BoundParameter) - 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, 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 + If node.ParameterSymbol?.ContainingSymbol.IsQueryLambdaMethod AndAlso Not _uniqueNodes.Add(node) Then + node = New BoundParameter(node.Syntax, node.ParameterSymbol, node.IsLValue, node.SuppressVirtualCalls, node.Type, node.HasErrors) + End If - Public Overrides Function VisitPropertyAccess(node As BoundPropertyAccess) As BoundNode - node = DirectCast(MyBase.VisitPropertyAccess(node), BoundPropertyAccess) - 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)) + Return node End Function End Class End Class diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb index 0ea0cff621e64eef52296947e07963c54fb0c808..76fbeb98f6c4f1d12653f95980528afe0231f908 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb @@ -238,12 +238,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Group By w ... nto Count()') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'Group By w ... nto Count()') Initializers(3): - IInvocationExpression ( Function .get_w() As System.String()) (OperationKind.InvocationExpression, Type: System.String()) (Syntax: 'Group By w ... nto Count()') + IPropertyReferenceExpression: ReadOnly Property .w As System.String() (OperationKind.PropertyReferenceExpression, Type: System.String()) (Syntax: 'Group By w ... nto Count()') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Group By w ... nto Count()') - Arguments(0) - IInvocationExpression ( Function .get_z() As System.String) (OperationKind.InvocationExpression, Type: System.String) (Syntax: 'Group By w ... nto Count()') + IPropertyReferenceExpression: ReadOnly Property .z As System.String (OperationKind.PropertyReferenceExpression, Type: System.String) (Syntax: 'Group By w ... nto Count()') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Group By w ... nto Count()') - Arguments(0) IInvocationExpression ( Function System.Collections.Generic.IEnumerable(Of System.String).Count() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Count()') Instance Receiver: IParameterReferenceExpression: $VB$ItAnonymous (OperationKind.ParameterReferenceExpression, Type: System.Collections.Generic.IEnumerable(Of System.String)) (Syntax: 'Group By w ... nto Count()') Arguments(0) diff --git a/src/Compilers/VisualBasic/Test/Semantic/Semantics/QueryExpressions.vb b/src/Compilers/VisualBasic/Test/Semantic/Semantics/QueryExpressions.vb index a117249146df96e13d5d03b9dc306d0d34e9728d..e91743b38053fdf89c47a37302f19fe47fa7e1f8 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Semantics/QueryExpressions.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Semantics/QueryExpressions.vb @@ -238,74 +238,6 @@ Where System.Func`2[System.Int32,System.Boolean] End Sub - - - Public Sub WhereClause02_IOperation() - Dim source = 0 - System.Console.WriteLine("-----") - Dim q2 As Object = From s In q Where s > 0 Where 10 > s'BIND:"From s In q Where s > 0 Where 10 > s" - End Sub -End Module]]>.Value - - Dim expectedOperationTree = s') - Conversion: CommonConversion (Exists: True, IsIdentity: False, IsNumeric: False, IsReference: True, IsUserDefined: False) (MethodSymbol: null) - Operand: ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: QueryAble) (Syntax: 'From s In q ... here 10 > s') - Expression: IInvocationExpression ( Function QueryAble.Where(x As System.Func(Of System.Int32, System.Boolean)) As QueryAble) (OperationKind.InvocationExpression, Type: QueryAble) (Syntax: 'Where 10 > s') - Instance Receiver: IInvocationExpression ( Function QueryAble.Where(x As System.Func(Of System.Int32, System.Boolean)) As QueryAble) (OperationKind.InvocationExpression, Type: QueryAble) (Syntax: 'Where s > 0') - Instance Receiver: ILocalReferenceExpression: q (OperationKind.LocalReferenceExpression, Type: QueryAble) (Syntax: 'q') - Arguments(1): - IArgument (ArgumentKind.DefaultValue, Matching Parameter: x) (OperationKind.Argument) (Syntax: 's > 0') - IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Func(Of System.Int32, System.Boolean)) (Syntax: 's > 0') - Conversion: CommonConversion (Exists: True, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) - Operand: IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As System.Boolean) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's > 0') - IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's > 0') - IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's > 0') - ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 's > 0') - Left: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 's > 0') - Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0') - InConversion: null - OutConversion: null - Arguments(1): - IArgument (ArgumentKind.DefaultValue, Matching Parameter: x) (OperationKind.Argument) (Syntax: '10 > s') - IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Func(Of System.Int32, System.Boolean)) (Syntax: '10 > s') - Conversion: CommonConversion (Exists: True, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) - Operand: IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As System.Boolean) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: '10 > s') - IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: '10 > s') - IReturnStatement (OperationKind.ReturnStatement) (Syntax: '10 > s') - ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: '10 > s') - Left: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 10) (Syntax: '10') - Right: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: '10 > s') - InConversion: null - OutConversion: null -]]>.Value - - Dim expectedDiagnostics = String.Empty - - VerifyOperationTreeAndDiagnosticsForTest(Of QueryExpressionSyntax)(source, expectedOperationTree, expectedDiagnostics) - End Sub - Public Sub Test4() @@ -2151,13 +2083,6 @@ Module Module1 Sub Main() Dim q As New QueryAble() - System.Console.WriteLine("-----") - Dim q1 As Object = From s In q Select t = s * 2 Select t - System.Console.WriteLine() - System.Console.WriteLine("-----") - Dim q2 As Object = From s In q Select s * 3 Where 100 Select -1 - System.Console.WriteLine() - System.Console.WriteLine("-----") Dim ind As New Index() Dim q3 As Object = From s In q'BIND:"From s In q" @@ -2169,9 +2094,6 @@ Module Module1 Where Num2 = -10 + Num1() Select ind!Two Where Two > 0 - - System.Console.WriteLine() - System.Console.WriteLine("-----") End Sub End Module]]>.Value @@ -3641,7 +3563,7 @@ BC42016: Implicit conversion from 'Boolean' to 'String'. - Public Sub While1() + Public Sub While1_TakeWhile() Dim source = 1 - Dim q2 As Object = From s In q Skip While s > 1 + Dim q1 As Object = From s In q Take While s > 1'BIND:"From s In q Take While s > 1" End Sub End Module]]>.Value Dim expectedOperationTree = 1') - IVariableDeclaration (1 variables) (OperationKind.VariableDeclaration) (Syntax: 'q1') - Variables: Local_1: q1 As System.Object - Initializer: IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Object, IsInvalid) (Syntax: 'From s In q ... While s > 1') - Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) - Operand: ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: ?, IsInvalid) (Syntax: 'From s In q ... While s > 1') - Expression: IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: 'Take While s > 1') - Children(2): - ILocalReferenceExpression: q (OperationKind.LocalReferenceExpression, Type: QueryAble) (Syntax: 'q') - IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As ?) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's > 1') - IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's > 1') - IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's > 1') - ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 's > 1') - Left: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 's > 1') - Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') - IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclarationStatement, IsInvalid) (Syntax: 'Dim q2 As O ... While s > 1') - IVariableDeclaration (1 variables) (OperationKind.VariableDeclaration) (Syntax: 'q2') - Variables: Local_1: q2 As System.Object - Initializer: IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Object, IsInvalid) (Syntax: 'From s In q ... While s > 1') - Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) - Operand: ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: ?, IsInvalid) (Syntax: 'From s In q ... While s > 1') - Expression: IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: 'Skip While s > 1') - Children(2): - ILocalReferenceExpression: q (OperationKind.LocalReferenceExpression, Type: QueryAble) (Syntax: 'q') - IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As ?) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's > 1') - IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's > 1') - IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's > 1') - ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 's > 1') - Left: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 's > 1') - Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') - ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') - Statement: null - IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') - ReturnedValue: null +IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Object, IsInvalid) (Syntax: 'From s In q ... While s > 1') + Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) + Operand: ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: ?, IsInvalid) (Syntax: 'From s In q ... While s > 1') + Expression: IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: 'Take While s > 1') + Children(2): + ILocalReferenceExpression: q (OperationKind.LocalReferenceExpression, Type: QueryAble) (Syntax: 'q') + IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As ?) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's > 1') + IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's > 1') + IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's > 1') + ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 's > 1') + Left: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 's > 1') + Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') ]]>.Value Dim expectedDiagnostics = 1 + Dim q1 As Object = From s In q Take While s > 1'BIND:"From s In q Take While s > 1" ~~~~~~~~~~ +]]>.Value + + VerifyOperationTreeAndDiagnosticsForTest(Of QueryExpressionSyntax)(source, expectedOperationTree, expectedDiagnostics) + End Sub + + + + Public Sub While1_SkipWhile() + Dim source = 1'BIND:"From s In q Skip While s > 1" + End Sub +End Module]]>.Value + + Dim expectedOperationTree = 1') + Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) + Operand: ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: ?, IsInvalid) (Syntax: 'From s In q ... While s > 1') + Expression: IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: 'Skip While s > 1') + Children(2): + ILocalReferenceExpression: q (OperationKind.LocalReferenceExpression, Type: QueryAble) (Syntax: 'q') + IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As ?) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's > 1') + IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's > 1') + IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's > 1') + ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 's > 1') + Left: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 's > 1') + Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') +]]>.Value + + Dim expectedDiagnostics = 1 + Dim q2 As Object = From s In q Skip While s > 1'BIND:"From s In q Skip While s > 1" ~~~~~~~~~~ ]]>.Value - VerifyOperationTreeAndDiagnosticsForTest(Of MethodBlockSyntax)(source, expectedOperationTree, expectedDiagnostics) + VerifyOperationTreeAndDiagnosticsForTest(Of QueryExpressionSyntax)(source, expectedOperationTree, expectedDiagnostics) End Sub @@ -5638,19 +5570,15 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's2 + s1') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 's3 = s2 + s1') Initializers(3): - IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2 + s1') + IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2 + s1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2 + s1') - Arguments(0) - IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2 + s1') + IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2 + s1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2 + s1') - Arguments(0) IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's2 + s1') - Left: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2 + s1') + Left: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2 + s1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2 + s1') - Arguments(0) - Right: IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2 + s1') + Right: IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2 + s1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2 + s1') - Arguments(0) InConversion: null OutConversion: null ]]>.Value @@ -5720,12 +5648,10 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve Initializers(2): IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's3 = s2 + s1') IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's2 + s1') - Left: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2 + s1') + Left: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2 + s1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2 + s1') - Arguments(0) - Right: IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2 + s1') + Right: IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2 + s1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2 + s1') - Arguments(0) InConversion: null OutConversion: null Arguments(1): @@ -5740,19 +5666,14 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's4 = s1 + s2 + s3') IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') Left: IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's1 + s2') - Left: IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>.get_$VB$It() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 's1 + s2 + s3') + Left: IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.$VB$It As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 's1 + s2 + s3') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3') - Arguments(0) - Arguments(0) - Right: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>.get_$VB$It() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 's1 + s2 + s3') + Right: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.$VB$It As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 's1 + s2 + s3') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3') - Arguments(0) - Arguments(0) - Right: IInvocationExpression ( Function , Key s3 As System.Int32>.get_s3() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') + Right: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.s3 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3') - Arguments(0) InConversion: null OutConversion: null Arguments(1): @@ -5764,53 +5685,35 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's1 + s2 + s3 + s4') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 's5 = s1 + s2 + s3 + s4') Initializers(5): - IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>.get_$VB$It() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_$VB$It() As , Key s3 As System.Int32>) (OperationKind.InvocationExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') + IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.$VB$It As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.$VB$It As , Key s3 As System.Int32> (OperationKind.PropertyReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) - Arguments(0) - Arguments(0) - IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>.get_$VB$It() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_$VB$It() As , Key s3 As System.Int32>) (OperationKind.InvocationExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') + IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.$VB$It As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.$VB$It As , Key s3 As System.Int32> (OperationKind.PropertyReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) - Arguments(0) - Arguments(0) - IInvocationExpression ( Function , Key s3 As System.Int32>.get_s3() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_$VB$It() As , Key s3 As System.Int32>) (OperationKind.InvocationExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') + IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.s3 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.$VB$It As , Key s3 As System.Int32> (OperationKind.PropertyReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) - Arguments(0) - IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_s4() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.s4 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') Left: IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3') Left: IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's1 + s2') - Left: IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>.get_$VB$It() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_$VB$It() As , Key s3 As System.Int32>) (OperationKind.InvocationExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') + Left: IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.$VB$It As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.$VB$It As , Key s3 As System.Int32> (OperationKind.PropertyReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) - Arguments(0) - Arguments(0) - Right: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>.get_$VB$It() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_$VB$It() As , Key s3 As System.Int32>) (OperationKind.InvocationExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') + Right: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.$VB$It As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.$VB$It As , Key s3 As System.Int32> (OperationKind.PropertyReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) - Arguments(0) - Arguments(0) - Right: IInvocationExpression ( Function , Key s3 As System.Int32>.get_s3() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') - Instance Receiver: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_$VB$It() As , Key s3 As System.Int32>) (OperationKind.InvocationExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') + Right: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>.s3 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.$VB$It As , Key s3 As System.Int32> (OperationKind.PropertyReferenceExpression, Type: , Key s3 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) - Arguments(0) - Right: IInvocationExpression ( Function , Key s3 As System.Int32>, Key s4 As System.Int32>.get_s4() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') + Right: IPropertyReferenceExpression: ReadOnly Property , Key s3 As System.Int32>, Key s4 As System.Int32>.s4 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1 + s2 + s3 + s4') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key s3 As System.Int32>, Key s4 As System.Int32>) (Syntax: 's1 + s2 + s3 + s4') - Arguments(0) InConversion: null OutConversion: null ]]>.Value @@ -7437,9 +7340,8 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's3') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's3') ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.Multiply, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's2 * 2') - Left: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's3') + Left: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's3') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's3') - Arguments(0) Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') InConversion: null OutConversion: null @@ -7460,12 +7362,10 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Join s3 In ... uals s2 * 2') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'Join s3 In ... uals s2 * 2') Initializers(3): - IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Join s3 In ... uals s2 * 2') + IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Join s3 In ... uals s2 * 2') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Join s3 In ... uals s2 * 2') - Arguments(0) - IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Join s3 In ... uals s2 * 2') + IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Join s3 In ... uals s2 * 2') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Join s3 In ... uals s2 * 2') - Arguments(0) IParameterReferenceExpression: s3 (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'Join s3 In ... uals s2 * 2') InConversion: null OutConversion: null @@ -8849,12 +8749,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Group s1, s ... (), Max(s1)') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ), Key c As System.Int32, Key Max As System.Int32>) (Syntax: 'Group s1, s ... (), Max(s1)') Initializers(5): - IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Group s1, s ... (), Max(s1)') + IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Group s1, s ... (), Max(s1)') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Group s1, s ... (), Max(s1)') - Arguments(0) - IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Group s1, s ... (), Max(s1)') + IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Group s1, s ... (), Max(s1)') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Group s1, s ... (), Max(s1)') - Arguments(0) IParameterReferenceExpression: $VB$ItAnonymous (OperationKind.ParameterReferenceExpression, Type: System.Collections.Generic.IEnumerable(Of )) (Syntax: 'Group s1, s ... (), Max(s1)') IInvocationExpression ( Function System.Collections.Generic.IEnumerable(Of ).Count() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Count()') Instance Receiver: IParameterReferenceExpression: $VB$ItAnonymous (OperationKind.ParameterReferenceExpression, Type: System.Collections.Generic.IEnumerable(Of )) (Syntax: 'Group s1, s ... (), Max(s1)') @@ -8868,9 +8766,8 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste Operand: IAnonymousFunctionExpression (Symbol: Function ($VB$It As ) As System.Int32) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's1') IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's1') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's1') - ReturnedValue: IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's1') + ReturnedValue: IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's1') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's1') - Arguments(0) InConversion: null OutConversion: null InConversion: null @@ -8972,9 +8869,8 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste Operand: IAnonymousFunctionExpression (Symbol: Function ($VB$It As ) As System.Int32) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 'key') IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 'key') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'key') - ReturnedValue: IInvocationExpression ( Function .get_key() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'key') + ReturnedValue: IPropertyReferenceExpression: ReadOnly Property .key As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'key') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'key') - Arguments(0) InConversion: null OutConversion: null IArgument (ArgumentKind.DefaultValue, Matching Parameter: innerKeySelector) (OperationKind.Argument) (Syntax: 's1') @@ -8994,12 +8890,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Join s1 In ... y Equals s1') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'Join s1 In ... y Equals s1') Initializers(3): - IInvocationExpression ( Function .get_key() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Join s1 In ... y Equals s1') + IPropertyReferenceExpression: ReadOnly Property .key As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Join s1 In ... y Equals s1') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Join s1 In ... y Equals s1') - Arguments(0) - IInvocationExpression ( Function .get_Group() As System.Collections.Generic.IEnumerable(Of System.Int32)) (OperationKind.InvocationExpression, Type: System.Collections.Generic.IEnumerable(Of System.Int32)) (Syntax: 'Join s1 In ... y Equals s1') + IPropertyReferenceExpression: ReadOnly Property .Group As System.Collections.Generic.IEnumerable(Of System.Int32) (OperationKind.PropertyReferenceExpression, Type: System.Collections.Generic.IEnumerable(Of System.Int32)) (Syntax: 'Join s1 In ... y Equals s1') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Join s1 In ... y Equals s1') - Arguments(0) IParameterReferenceExpression: s1 (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'Join s1 In ... y Equals s1') InConversion: null OutConversion: null @@ -9746,9 +9640,8 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.Multiply, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: '(s1 + 1) * 2') Left: IParenthesizedExpression (OperationKind.ParenthesizedExpression, Type: System.Int32) (Syntax: '(s1 + 1)') Operand: IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 's1 + 1') - Left: IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's3') + Left: IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's3') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's3') - Arguments(0) Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') InConversion: null @@ -9770,12 +9663,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Group Join ... gr2 = Group') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'Group Join ... gr2 = Group') Initializers(3): - IInvocationExpression ( Function .get_s1() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Group Join ... gr2 = Group') + IPropertyReferenceExpression: ReadOnly Property .s1 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Group Join ... gr2 = Group') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Group Join ... gr2 = Group') - Arguments(0) - IInvocationExpression ( Function .get_gr1() As System.Collections.Generic.IEnumerable(Of System.Int32)) (OperationKind.InvocationExpression, Type: System.Collections.Generic.IEnumerable(Of System.Int32)) (Syntax: 'Group Join ... gr2 = Group') + IPropertyReferenceExpression: ReadOnly Property .gr1 As System.Collections.Generic.IEnumerable(Of System.Int32) (OperationKind.PropertyReferenceExpression, Type: System.Collections.Generic.IEnumerable(Of System.Int32)) (Syntax: 'Group Join ... gr2 = Group') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Group Join ... gr2 = Group') - Arguments(0) IParameterReferenceExpression: $VB$ItAnonymous (OperationKind.ParameterReferenceExpression, Type: System.Collections.Generic.IEnumerable(Of System.Int32)) (Syntax: 'Group Join ... gr2 = Group') InConversion: null OutConversion: null @@ -9904,9 +9795,8 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste Operand: IAnonymousFunctionExpression (Symbol: Function ($VB$It As ) As System.Int32) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's2') IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's2') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's2') - ReturnedValue: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2') + ReturnedValue: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2') - Arguments(0) InConversion: null OutConversion: null IArgument (ArgumentKind.DefaultValue, Matching Parameter: innerKeySelector) (OperationKind.Argument) (Syntax: 's4') @@ -9926,12 +9816,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Join ... 2 Equals s4') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'Join ... 2 Equals s4') Initializers(3): - IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Join ... 2 Equals s4') + IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Join ... 2 Equals s4') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Join ... 2 Equals s4') - Arguments(0) - IInvocationExpression ( Function .get_s3() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Join ... 2 Equals s4') + IPropertyReferenceExpression: ReadOnly Property .s3 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Join ... 2 Equals s4') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Join ... 2 Equals s4') - Arguments(0) IParameterReferenceExpression: s4 (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'Join ... 2 Equals s4') InConversion: null OutConversion: null @@ -9952,9 +9840,8 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste Operand: IAnonymousFunctionExpression (Symbol: Function ($VB$It As ) As System.Int32) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's2') IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's2') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's2') - ReturnedValue: IInvocationExpression ( Function .get_s2() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 's2') + ReturnedValue: IPropertyReferenceExpression: ReadOnly Property .s2 As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 's2') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 's2') - Arguments(0) InConversion: null OutConversion: null IArgument (ArgumentKind.DefaultValue, Matching Parameter: resultSelector) (OperationKind.Argument) (Syntax: 'Group Join ... s3 = Group') @@ -11185,12 +11072,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 'x > y') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x > y') ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 'x > y') - Left: IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x > y') + Left: IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x > y') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x > y') - Arguments(0) - Right: IInvocationExpression ( Function .get_y() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x > y') + Right: IPropertyReferenceExpression: ReadOnly Property .y As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x > y') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x > y') - Arguments(0) InConversion: null OutConversion: null Arguments(1): @@ -11201,12 +11086,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 'x + y') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x + y') ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 'x + y') - Left: IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y') + Left: IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y') - Arguments(0) - Right: IInvocationExpression ( Function .get_y() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y') + Right: IPropertyReferenceExpression: ReadOnly Property .y As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y') - Arguments(0) InConversion: null OutConversion: null ]]>.Value @@ -11303,12 +11186,10 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Aggregate x ... Where(True)') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'z In New Integer() {3}') Initializers(3): - IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Aggregate x ... Where(True)') + IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Aggregate x ... Where(True)') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Aggregate x ... Where(True)') - Arguments(0) - IInvocationExpression ( Function .get_y() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'Aggregate x ... Where(True)') + IPropertyReferenceExpression: ReadOnly Property .y As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'Aggregate x ... Where(True)') Instance Receiver: IParameterReferenceExpression: $VB$It1 (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'Aggregate x ... Where(True)') - Arguments(0) IParameterReferenceExpression: z (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'Aggregate x ... Where(True)') InConversion: null OutConversion: null @@ -11485,11 +11366,9 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste Operand: IAnonymousFunctionExpression (Symbol: Function ($VB$It As , Key z As System.Int32>) As System.Int32) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 'x') IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 'x') IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x') - ReturnedValue: IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x') - Instance Receiver: IInvocationExpression ( Function , Key z As System.Int32>.get_$VB$It1() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 'x') + ReturnedValue: IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key z As System.Int32>.$VB$It1 As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 'x') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key z As System.Int32>) (Syntax: 'x') - Arguments(0) - Arguments(0) InConversion: null OutConversion: null Arguments(0) @@ -11532,19 +11411,14 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'Select x, y, z') Initializers(3): - IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x') - Instance Receiver: IInvocationExpression ( Function , Key z As System.Int32>.get_$VB$It1() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 'x') + IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key z As System.Int32>.$VB$It1 As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 'x') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key z As System.Int32>) (Syntax: 'x') - Arguments(0) - Arguments(0) - IInvocationExpression ( Function .get_y() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x') - Instance Receiver: IInvocationExpression ( Function , Key z As System.Int32>.get_$VB$It1() As ) (OperationKind.InvocationExpression, Type: ) (Syntax: 'x') + IPropertyReferenceExpression: ReadOnly Property .y As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x') + Instance Receiver: IPropertyReferenceExpression: ReadOnly Property , Key z As System.Int32>.$VB$It1 As (OperationKind.PropertyReferenceExpression, Type: ) (Syntax: 'x') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key z As System.Int32>) (Syntax: 'x') - Arguments(0) - Arguments(0) - IInvocationExpression ( Function , Key z As System.Int32>.get_z() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x') + IPropertyReferenceExpression: ReadOnly Property , Key z As System.Int32>.z As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: , Key z As System.Int32>) (Syntax: 'x') - Arguments(0) InConversion: null OutConversion: null Arguments(1): @@ -11556,26 +11430,20 @@ ITranslatedQueryExpression (OperationKind.TranslatedQueryExpression, Type: Syste IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x + y + z') ReturnedValue: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'w = x + y + z') Initializers(4): - IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y + z') + IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y + z') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y + z') - Arguments(0) - IInvocationExpression ( Function .get_y() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y + z') + IPropertyReferenceExpression: ReadOnly Property .y As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y + z') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y + z') - Arguments(0) - IInvocationExpression ( Function .get_z() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y + z') + IPropertyReferenceExpression: ReadOnly Property .z As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y + z') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y + z') - Arguments(0) IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 'x + y + z') Left: IBinaryOperatorExpression (BinaryOperatorKind.Add, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 'x + y') - Left: IInvocationExpression ( Function .get_x() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y + z') + Left: IPropertyReferenceExpression: ReadOnly Property .x As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y + z') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y + z') - Arguments(0) - Right: IInvocationExpression ( Function .get_y() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y + z') + Right: IPropertyReferenceExpression: ReadOnly Property .y As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y + z') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y + z') - Arguments(0) - Right: IInvocationExpression ( Function .get_z() As System.Int32) (OperationKind.InvocationExpression, Type: System.Int32) (Syntax: 'x + y + z') + Right: IPropertyReferenceExpression: ReadOnly Property .z As System.Int32 (OperationKind.PropertyReferenceExpression, Type: System.Int32) (Syntax: 'x + y + z') Instance Receiver: IParameterReferenceExpression: $VB$It (OperationKind.ParameterReferenceExpression, Type: ) (Syntax: 'x + y + z') - Arguments(0) InConversion: null OutConversion: null Arguments(1): @@ -14218,6 +14086,131 @@ BC30451: 'Whi' is not declared. It may be inaccessible due to its protection lev ) End Sub + + + Public Sub IOperationForQueryClause() + Dim source = 0'BIND:"Where s > 0" + + End Sub +End Module]]>.Value + + Dim expectedOperationTree = 0') + Instance Receiver: ILocalReferenceExpression: q (OperationKind.LocalReferenceExpression, Type: QueryAble) (Syntax: 'q') + Arguments(1): + IArgument (ArgumentKind.DefaultValue, Matching Parameter: x) (OperationKind.Argument) (Syntax: 's > 0') + IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Func(Of System.Int32, System.Boolean)) (Syntax: 's > 0') + Conversion: CommonConversion (Exists: True, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) + Operand: IAnonymousFunctionExpression (Symbol: Function (s As System.Int32) As System.Boolean) (OperationKind.AnonymousFunctionExpression, Type: null) (Syntax: 's > 0') + IBlockStatement (1 statements) (OperationKind.BlockStatement) (Syntax: 's > 0') + IReturnStatement (OperationKind.ReturnStatement) (Syntax: 's > 0') + ReturnedValue: IBinaryOperatorExpression (BinaryOperatorKind.GreaterThan, Checked) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 's > 0') + Left: IParameterReferenceExpression: s (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 's > 0') + Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0') + InConversion: null + OutConversion: null +]]>.Value + + Dim expectedDiagnostics = String.Empty + + VerifyOperationTreeAndDiagnosticsForTest(Of WhereClauseSyntax)(source, expectedOperationTree, expectedDiagnostics) + End Sub + + + + Public Sub IOperationForCollectionRangeVariable() + Dim source = 0 Where 10 > s'BIND:"s In q" + End Sub +End Module]]>.Value + + Dim expectedOperationTree = .Value + + Dim expectedDiagnostics = String.Empty + + VerifyOperationTreeAndDiagnosticsForTest(Of CollectionRangeVariableSyntax)(source, expectedOperationTree, expectedDiagnostics) + End Sub + + + + Public Sub IOperationForRangeVariableReference() + Dim source = 0'BIND:"s" + End Sub +End Module]]>.Value + + Dim expectedOperationTree = .Value + + Dim expectedDiagnostics = String.Empty + + VerifyOperationTreeAndDiagnosticsForTest(Of IdentifierNameSyntax)(source, expectedOperationTree, expectedDiagnostics) + End Sub End Class End Namespace