From 01ba1e711eb58e630ae168e2a7f1dd22e27e75a3 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Mon, 14 Aug 2017 15:08:08 -0700 Subject: [PATCH] Refactored ILabelStatement to ILabeledStatement. --- .../Operations/CSharpOperationFactory.cs | 10 +++--- .../IOperationTests_IForLoopStatement.cs | 4 +-- ...OperationTests_IWhileUntilLoopStatement.cs | 4 +-- .../Generated/Operations.xml.Generated.cs | 34 +++++++++--------- ...LabelStatement.cs => ILabeledStatement.cs} | 4 +-- .../Portable/Operations/OperationCloner.cs | 4 +-- .../Core/Portable/Operations/OperationKind.cs | 4 +-- .../Portable/Operations/OperationVisitor.cs | 4 +-- .../Core/Portable/PublicAPI.Unshipped.txt | 12 +++---- .../Operations/VisualBasicOperationFactory.vb | 6 ++-- .../BindingCollectionInitializerTests.vb | 2 +- .../Binding/BindingObjectInitializerTests.vb | 8 ++--- ...ationTests_IBlockStatement_MethodBlocks.vb | 36 +++++++++---------- .../IOperationTests_IConversionExpression.vb | 32 ++++++++--------- ...perationTests_IObjectCreationExpression.vb | 4 +-- ...tionTests_IParameterReferenceExpression.vb | 4 +-- ...OperationTests_IWhileUntilLoopStatement.vb | 4 +-- .../IOperationTests_InvalidExpression.vb | 4 +-- .../Semantic/Semantics/AnonymousTypesTests.vb | 28 +++++++-------- .../Semantic/Semantics/SelectCaseTests.vb | 4 +-- .../Compilation/OperationTreeVerifier.cs | 6 ++-- .../Compilation/TestOperationWalker.cs | 4 +-- .../Diagnostics/OperationTestAnalyzer.cs | 4 +-- 23 files changed, 113 insertions(+), 113 deletions(-) rename src/Compilers/Core/Portable/Operations/{ILabelStatement.cs => ILabeledStatement.cs} (88%) diff --git a/src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs b/src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs index bd1721ce525..a362a93b2f8 100644 --- a/src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs +++ b/src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs @@ -1264,24 +1264,24 @@ private IVariableDeclarationStatement CreateBoundMultipleLocalDeclarationsOperat return new LazyVariableDeclarationStatement(declarations, _semanticModel, syntax, type, constantValue); } - private ILabelStatement CreateBoundLabelStatementOperation(BoundLabelStatement boundLabelStatement) + private ILabeledStatement CreateBoundLabelStatementOperation(BoundLabelStatement boundLabelStatement) { ILabelSymbol label = boundLabelStatement.Label; - Lazy labeledStatement = new Lazy(() => Create(null)); + Lazy statement = new Lazy(() => Create(null)); SyntaxNode syntax = boundLabelStatement.Syntax; ITypeSymbol type = null; Optional constantValue = default(Optional); - return new LazyLabelStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue); + return new LazyLabeledStatement(label, statement, _semanticModel, syntax, type, constantValue); } - private ILabelStatement CreateBoundLabeledStatementOperation(BoundLabeledStatement boundLabeledStatement) + private ILabeledStatement CreateBoundLabeledStatementOperation(BoundLabeledStatement boundLabeledStatement) { ILabelSymbol label = boundLabeledStatement.Label; Lazy labeledStatement = new Lazy(() => Create(boundLabeledStatement.Body)); SyntaxNode syntax = boundLabeledStatement.Syntax; ITypeSymbol type = null; Optional constantValue = default(Optional); - return new LazyLabelStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue); + return new LazyLabeledStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue); } private IExpressionStatement CreateBoundExpressionStatementOperation(BoundExpressionStatement boundExpressionStatement) diff --git a/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IForLoopStatement.cs b/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IForLoopStatement.cs index 934286e1d52..8be978ee96a 100644 --- a/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IForLoopStatement.cs +++ b/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IForLoopStatement.cs @@ -911,8 +911,8 @@ static void Main(string[] args) Right: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') Body: IBlockStatement (2 statements) (OperationKind.BlockStatement) (Syntax: '{ ... }') IBranchStatement (BranchKind.GoTo, Label: stop) (OperationKind.BranchStatement) (Syntax: 'goto stop;') - ILabelStatement (Label: stop) (OperationKind.LabelStatement) (Syntax: 'stop: ... j = j + 1;') - LabeledStatement: IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'j = j + 1;') + ILabeledStatement (Label: stop) (OperationKind.LabeledStatement) (Syntax: 'stop: ... j = j + 1;') + Statement: IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'j = j + 1;') Expression: ISimpleAssignmentExpression (OperationKind.SimpleAssignmentExpression, Type: System.Int32) (Syntax: 'j = j + 1') Left: ILocalReferenceExpression: j (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'j') Right: IBinaryOperatorExpression (BinaryOperationKind.IntegerAdd) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 'j + 1') diff --git a/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs b/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs index 01ab790f0be..e12831d0560 100644 --- a/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs +++ b/src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs @@ -434,8 +434,8 @@ public static int GetFirstEvenNumber(int number) IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'number++;') Expression: IIncrementExpression (UnaryOperandKind.IntegerPostfixIncrement) (OperationKind.IncrementExpression, Type: System.Int32) (Syntax: 'number++') Left: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number') - ILabelStatement (Label: Even) (OperationKind.LabelStatement) (Syntax: 'Even: ... urn number;') - LabeledStatement: IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'return number;') + ILabeledStatement (Label: Even) (OperationKind.LabeledStatement) (Syntax: 'Even: ... urn number;') + Statement: IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'return number;') ReturnedValue: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number') "; VerifyOperationTreeForTest(source, expectedOperationTree); diff --git a/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs b/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs index 2db8a93319f..8fa9c5ec5bb 100644 --- a/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs +++ b/src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs @@ -2583,10 +2583,10 @@ public LazyIsTypeExpression(Lazy operand, ITypeSymbol isType, Semant /// /// Represents a C# or VB label statement. /// - internal abstract partial class BaseLabelStatement : Operation, ILabelStatement + internal abstract partial class BaseLabeledStatement : Operation, ILabeledStatement { - protected BaseLabelStatement(ILabelSymbol label, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional constantValue) : - base(OperationKind.LabelStatement, semanticModel, syntax, type, constantValue) + protected BaseLabeledStatement(ILabelSymbol label, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional constantValue) : + base(OperationKind.LabeledStatement, semanticModel, syntax, type, constantValue) { Label = label; } @@ -2594,55 +2594,55 @@ internal abstract partial class BaseLabelStatement : Operation, ILabelStatement /// Label that can be the target of branches. /// public ILabelSymbol Label { get; } - protected abstract IOperation LabeledStatementImpl { get; } + protected abstract IOperation StatementImpl { get; } public override IEnumerable Children { get { - yield return LabeledStatement; + yield return Statement; } } /// /// Statement that has been labeled. /// - public IOperation LabeledStatement => Operation.SetParentOperation(LabeledStatementImpl, this); + public IOperation Statement => Operation.SetParentOperation(StatementImpl, this); public override void Accept(OperationVisitor visitor) { - visitor.VisitLabelStatement(this); + visitor.VisitLabeledStatement(this); } public override TResult Accept(OperationVisitor visitor, TArgument argument) { - return visitor.VisitLabelStatement(this, argument); + return visitor.VisitLabeledStatement(this, argument); } } /// /// Represents a C# or VB label statement. /// - internal sealed partial class LabelStatement : BaseLabelStatement, ILabelStatement + internal sealed partial class LabeledStatement : BaseLabeledStatement, ILabeledStatement { - public LabelStatement(ILabelSymbol label, IOperation labeledStatement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional constantValue) : + public LabeledStatement(ILabelSymbol label, IOperation labeledStatement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional constantValue) : base(label, semanticModel, syntax, type, constantValue) { - LabeledStatementImpl = labeledStatement; + StatementImpl = labeledStatement; } - protected override IOperation LabeledStatementImpl { get; } + protected override IOperation StatementImpl { get; } } /// /// Represents a C# or VB label statement. /// - internal sealed partial class LazyLabelStatement : BaseLabelStatement, ILabelStatement + internal sealed partial class LazyLabeledStatement : BaseLabeledStatement, ILabeledStatement { - private readonly Lazy _lazyLabeledStatement; + private readonly Lazy _lazyStatement; - public LazyLabelStatement(ILabelSymbol label, Lazy labeledStatement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional constantValue) : base(label, semanticModel, syntax, type, constantValue) + public LazyLabeledStatement(ILabelSymbol label, Lazy statement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional constantValue) : base(label, semanticModel, syntax, type, constantValue) { - _lazyLabeledStatement = labeledStatement ?? throw new System.ArgumentNullException(nameof(labeledStatement)); + _lazyStatement = statement ?? throw new System.ArgumentNullException(nameof(statement)); } - protected override IOperation LabeledStatementImpl => _lazyLabeledStatement.Value; + protected override IOperation StatementImpl => _lazyStatement.Value; } /// diff --git a/src/Compilers/Core/Portable/Operations/ILabelStatement.cs b/src/Compilers/Core/Portable/Operations/ILabeledStatement.cs similarity index 88% rename from src/Compilers/Core/Portable/Operations/ILabelStatement.cs rename to src/Compilers/Core/Portable/Operations/ILabeledStatement.cs index 50ccaf51a97..8290bd1d425 100644 --- a/src/Compilers/Core/Portable/Operations/ILabelStatement.cs +++ b/src/Compilers/Core/Portable/Operations/ILabeledStatement.cs @@ -11,7 +11,7 @@ namespace Microsoft.CodeAnalysis.Semantics /// This interface is reserved for implementation by its associated APIs. We reserve the right to /// change it in the future. /// - public interface ILabelStatement : IOperation + public interface ILabeledStatement : IOperation { /// /// Label that can be the target of branches. @@ -20,7 +20,7 @@ public interface ILabelStatement : IOperation /// /// Statement that has been labeled. /// - IOperation LabeledStatement { get; } + IOperation Statement { get; } } } diff --git a/src/Compilers/Core/Portable/Operations/OperationCloner.cs b/src/Compilers/Core/Portable/Operations/OperationCloner.cs index 038de6c65fd..b443c0a9f0b 100644 --- a/src/Compilers/Core/Portable/Operations/OperationCloner.cs +++ b/src/Compilers/Core/Portable/Operations/OperationCloner.cs @@ -99,9 +99,9 @@ public override IOperation VisitForEachLoopStatement(IForEachLoopStatement opera return new ForEachLoopStatement(operation.IterationVariable, Visit(operation.Collection), operation.LoopKind, Visit(operation.Body), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue); } - public override IOperation VisitLabelStatement(ILabelStatement operation, object argument) + public override IOperation VisitLabeledStatement(ILabeledStatement operation, object argument) { - return new LabelStatement(operation.Label, Visit(operation.LabeledStatement), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue); + return new LabeledStatement(operation.Label, Visit(operation.Statement), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue); } public override IOperation VisitBranchStatement(IBranchStatement operation, object argument) diff --git a/src/Compilers/Core/Portable/Operations/OperationKind.cs b/src/Compilers/Core/Portable/Operations/OperationKind.cs index f0a17227330..a1277dfed45 100644 --- a/src/Compilers/Core/Portable/Operations/OperationKind.cs +++ b/src/Compilers/Core/Portable/Operations/OperationKind.cs @@ -25,8 +25,8 @@ public enum OperationKind IfStatement = 0x5, /// Indicates an . LoopStatement = 0x6, - /// Indicates an . - LabelStatement = 0x7, + /// Indicates an . + LabeledStatement = 0x7, /// Indicates an . BranchStatement = 0x8, /// Indicates an . diff --git a/src/Compilers/Core/Portable/Operations/OperationVisitor.cs b/src/Compilers/Core/Portable/Operations/OperationVisitor.cs index 56c1f3b4db0..bafe9ee264d 100644 --- a/src/Compilers/Core/Portable/Operations/OperationVisitor.cs +++ b/src/Compilers/Core/Portable/Operations/OperationVisitor.cs @@ -90,7 +90,7 @@ public virtual void VisitForEachLoopStatement(IForEachLoopStatement operation) DefaultVisit(operation); } - public virtual void VisitLabelStatement(ILabelStatement operation) + public virtual void VisitLabeledStatement(ILabeledStatement operation) { DefaultVisit(operation); } @@ -560,7 +560,7 @@ public virtual TResult VisitForEachLoopStatement(IForEachLoopStatement operation return DefaultVisit(operation, argument); } - public virtual TResult VisitLabelStatement(ILabelStatement operation, TArgument argument) + public virtual TResult VisitLabeledStatement(ILabeledStatement operation, TArgument argument) { return DefaultVisit(operation, argument); } diff --git a/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt b/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt index a9d2055d6d0..d296b1dba48 100644 --- a/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt +++ b/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt @@ -90,7 +90,7 @@ Microsoft.CodeAnalysis.OperationKind.InvalidStatement = 1 -> Microsoft.CodeAnaly Microsoft.CodeAnalysis.OperationKind.InvocationExpression = 259 -> Microsoft.CodeAnalysis.OperationKind Microsoft.CodeAnalysis.OperationKind.IsPatternExpression = 517 -> Microsoft.CodeAnalysis.OperationKind Microsoft.CodeAnalysis.OperationKind.IsTypeExpression = 278 -> Microsoft.CodeAnalysis.OperationKind -Microsoft.CodeAnalysis.OperationKind.LabelStatement = 7 -> Microsoft.CodeAnalysis.OperationKind +Microsoft.CodeAnalysis.OperationKind.LabeledStatement = 7 -> Microsoft.CodeAnalysis.OperationKind Microsoft.CodeAnalysis.OperationKind.LambdaExpression = 273 -> Microsoft.CodeAnalysis.OperationKind Microsoft.CodeAnalysis.OperationKind.LiteralExpression = 257 -> Microsoft.CodeAnalysis.OperationKind Microsoft.CodeAnalysis.OperationKind.LocalFunctionStatement = 49 -> Microsoft.CodeAnalysis.OperationKind @@ -482,9 +482,9 @@ Microsoft.CodeAnalysis.Semantics.IIsPatternExpression.Pattern.get -> Microsoft.C Microsoft.CodeAnalysis.Semantics.IIsTypeExpression Microsoft.CodeAnalysis.Semantics.IIsTypeExpression.IsType.get -> Microsoft.CodeAnalysis.ITypeSymbol Microsoft.CodeAnalysis.Semantics.IIsTypeExpression.Operand.get -> Microsoft.CodeAnalysis.IOperation -Microsoft.CodeAnalysis.Semantics.ILabelStatement -Microsoft.CodeAnalysis.Semantics.ILabelStatement.Label.get -> Microsoft.CodeAnalysis.ILabelSymbol -Microsoft.CodeAnalysis.Semantics.ILabelStatement.LabeledStatement.get -> Microsoft.CodeAnalysis.IOperation +Microsoft.CodeAnalysis.Semantics.ILabeledStatement +Microsoft.CodeAnalysis.Semantics.ILabeledStatement.Label.get -> Microsoft.CodeAnalysis.ILabelSymbol +Microsoft.CodeAnalysis.Semantics.ILabeledStatement.Statement.get -> Microsoft.CodeAnalysis.IOperation Microsoft.CodeAnalysis.Semantics.ILambdaExpression Microsoft.CodeAnalysis.Semantics.ILambdaExpression.Body.get -> Microsoft.CodeAnalysis.Semantics.IBlockStatement Microsoft.CodeAnalysis.Semantics.ILambdaExpression.Signature.get -> Microsoft.CodeAnalysis.IMethodSymbol @@ -818,7 +818,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvalidStatement( virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation) -> void virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsPatternExpression(Microsoft.CodeAnalysis.Semantics.IIsPatternExpression operation) -> void virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsTypeExpression(Microsoft.CodeAnalysis.Semantics.IIsTypeExpression operation) -> void -virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLabelStatement(Microsoft.CodeAnalysis.Semantics.ILabelStatement operation) -> void +virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLabeledStatement(Microsoft.CodeAnalysis.Semantics.ILabeledStatement operation) -> void virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation) -> void virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLiteralExpression(Microsoft.CodeAnalysis.Semantics.ILiteralExpression operation) -> void virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLocalFunctionStatement(Microsoft.CodeAnalysis.Semantics.ILocalFunctionStatement operation) -> void @@ -908,7 +908,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.Vi virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation, TArgument argument) -> TResult virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsPatternExpression(Microsoft.CodeAnalysis.Semantics.IIsPatternExpression operation, TArgument argument) -> TResult virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsTypeExpression(Microsoft.CodeAnalysis.Semantics.IIsTypeExpression operation, TArgument argument) -> TResult -virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLabelStatement(Microsoft.CodeAnalysis.Semantics.ILabelStatement operation, TArgument argument) -> TResult +virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLabeledStatement(Microsoft.CodeAnalysis.Semantics.ILabeledStatement operation, TArgument argument) -> TResult virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation, TArgument argument) -> TResult virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLiteralExpression(Microsoft.CodeAnalysis.Semantics.ILiteralExpression operation, TArgument argument) -> TResult virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLocalFunctionStatement(Microsoft.CodeAnalysis.Semantics.ILocalFunctionStatement operation, TArgument argument) -> TResult diff --git a/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb b/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb index 8eed84d14b0..a2c3edd068a 100644 --- a/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb +++ b/src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb @@ -999,13 +999,13 @@ Namespace Microsoft.CodeAnalysis.Semantics Return New LazyReturnStatement(OperationKind.YieldReturnStatement, returnedValue, _semanticModel, syntax, type, constantValue) End Function - Private Function CreateBoundLabelStatementOperation(boundLabelStatement As BoundLabelStatement) As ILabelStatement + Private Function CreateBoundLabelStatementOperation(boundLabelStatement As BoundLabelStatement) As ILabeledStatement Dim label As ILabelSymbol = boundLabelStatement.Label - Dim labeledStatement As Lazy(Of IOperation) = New Lazy(Of IOperation)(Function() Nothing) + Dim statement As Lazy(Of IOperation) = New Lazy(Of IOperation)(Function() Nothing) Dim syntax As SyntaxNode = boundLabelStatement.Syntax Dim type As ITypeSymbol = Nothing Dim constantValue As [Optional](Of Object) = New [Optional](Of Object)() - Return New LazyLabelStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue) + Return New LazyLabeledStatement(label, statement, _semanticModel, syntax, type, constantValue) End Function Private Function CreateBoundGotoStatementOperation(boundGotoStatement As BoundGotoStatement) As IBranchStatement diff --git a/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb index 991aba4faa4..c0aaaad437a 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb @@ -417,7 +417,7 @@ IBlockStatement (6 statements, 4 locals) (OperationKind.BlockStatement, IsInvali Left: IFieldReferenceExpression: C2.a As System.String (OperationKind.FieldReferenceExpression, Type: System.String, IsInvalid) (Syntax: 'a') Instance Receiver: IOperation: (OperationKind.None, IsInvalid) (Syntax: 'New C2() Wi ... .a = "goo"}') Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.String, Constant: "goo", IsInvalid) (Syntax: '"goo"') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') LabeledStatement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null diff --git a/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingObjectInitializerTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingObjectInitializerTests.vb index 29d1540ef04..280b3367e74 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingObjectInitializerTests.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingObjectInitializerTests.vb @@ -759,7 +759,7 @@ IBlockStatement (4 statements, 1 locals) (OperationKind.BlockStatement, IsInvali Children(1): IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: 'Unknown') Children(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') LabeledStatement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null @@ -1131,7 +1131,7 @@ IObjectCreationExpression (Constructor: Sub C1..ctor()) (OperationKind.ObjectCre IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return .Field') ReturnedValue: IFieldReferenceExpression: C1.Field As System.Int32 (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: '.Field') Instance Receiver: IOperation: (OperationKind.None) (Syntax: 'New C1 With ... d Function}') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') LabeledStatement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Function') @@ -1403,7 +1403,7 @@ IObjectCreationExpression (Constructor: Sub C2..ctor()) (OperationKind.ObjectCre Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: IFieldReferenceExpression: C2.Field As System.Func(Of System.Object) (OperationKind.FieldReferenceExpression, Type: System.Func(Of System.Object)) (Syntax: '.Field') Instance Receiver: IOperation: (OperationKind.None) (Syntax: 'As New C2 W ... d Function}') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') LabeledStatement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Object) (Syntax: 'End Function') @@ -1420,7 +1420,7 @@ IObjectCreationExpression (Constructor: Sub C2..ctor()) (OperationKind.ObjectCre Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: IFieldReferenceExpression: C2.Field As System.Func(Of System.Object) (OperationKind.FieldReferenceExpression, Type: System.Func(Of System.Object)) (Syntax: '.Field') Instance Receiver: IOperation: (OperationKind.None) (Syntax: 'As New C2 W ... d Function}') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') LabeledStatement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Object) (Syntax: 'End Function') diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IBlockStatement_MethodBlocks.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IBlockStatement_MethodBlocks.vb index b34fca301e6..aeb36e5dfbc 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IBlockStatement_MethodBlocks.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IBlockStatement_MethodBlocks.vb @@ -28,8 +28,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'Sub Meth Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -58,8 +58,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'Sub New( Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -93,8 +93,8 @@ IBlockStatement (4 statements, 1 locals) (OperationKind.BlockStatement) (Syntax: IfFalse: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return True') ReturnedValue: ILiteralExpression (Text: True) (OperationKind.LiteralExpression, Type: System.Boolean, Constant: True) (Syntax: 'True') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: Method (OperationKind.LocalReferenceExpression, Type: System.Boolean) (Syntax: 'End Function') ]]>.Value @@ -126,8 +126,8 @@ IBlockStatement (3 statements, 1 locals) (OperationKind.BlockStatement) (Syntax: Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Get') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Get') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Get') ReturnedValue: ILocalReferenceExpression: Prop (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Get') ]]>.Value @@ -162,8 +162,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'Set(Valu Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Set') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Set') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Set') ReturnedValue: null ]]>.Value @@ -202,8 +202,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'AddHandl Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End AddHandler') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End AddHandler') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End AddHandler') ReturnedValue: null ]]>.Value @@ -242,8 +242,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'RemoveHa Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End RemoveHandler') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End RemoveHandler') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End RemoveHandler') ReturnedValue: null ]]>.Value @@ -282,8 +282,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'RaiseEve Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2') IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If') IfFalse: null - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End RaiseEvent') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End RaiseEvent') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End RaiseEvent') ReturnedValue: null ]]>.Value @@ -317,8 +317,8 @@ IBlockStatement (4 statements, 1 locals) (OperationKind.BlockStatement) (Syntax: IfFalse: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return 0') ReturnedValue: ILiteralExpression (Text: 0) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Operator') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Operator') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Operator') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Operator') ]]>.Value diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IConversionExpression.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IConversionExpression.vb index 3a23439ffd2..9a3cb1ba0d2 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IConversionExpression.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IConversionExpression.vb @@ -764,8 +764,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: ILambdaExpression (Signature: Sub (i As System.Int32)) (OperationKind.LambdaExpression, Type: null) (Syntax: 'Sub(i As In ... End Sub') IBlockStatement (2 statements) (OperationKind.BlockStatement) (Syntax: 'Sub(i As In ... End Sub') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -797,8 +797,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: ILambdaExpression (Signature: Sub ()) (OperationKind.LambdaExpression, Type: null) (Syntax: 'Sub()'BIND: ... End Sub') IBlockStatement (2 statements) (OperationKind.BlockStatement) (Syntax: 'Sub()'BIND: ... End Sub') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -830,8 +830,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: ILambdaExpression (Signature: Sub (i As System.Int32)) (OperationKind.LambdaExpression, Type: null, IsInvalid) (Syntax: 'Sub(i As In ... End Sub') IBlockStatement (2 statements) (OperationKind.BlockStatement, IsInvalid) (Syntax: 'Sub(i As In ... End Sub') - ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -871,8 +871,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio Locals: Local_1: As System.Int32 IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return 1') ReturnedValue: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Function') ]]>.Value @@ -908,8 +908,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio Locals: Local_1: As System.Int32 IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return 1') ReturnedValue: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Function') ]]>.Value @@ -941,8 +941,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: ILambdaExpression (Signature: Sub ()) (OperationKind.LambdaExpression, Type: null, IsInvalid) (Syntax: 'Sub()'BIND: ... End Sub') IBlockStatement (2 statements) (OperationKind.BlockStatement, IsInvalid) (Syntax: 'Sub()'BIND: ... End Sub') - ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -2104,8 +2104,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio ReturnedValue: IBinaryOperatorExpression (BinaryOperationKind.IntegerLessThan) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 'num < 5') Left: IParameterReferenceExpression: num (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'num') Right: ILiteralExpression (Text: 5) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 5) (Syntax: '5') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'Function(num) num < 5') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'Function(num) num < 5') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Function(num) num < 5') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Boolean) (Syntax: 'Function(num) num < 5') ]]>.Value @@ -2144,8 +2144,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio ReturnedValue: IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Boolean, IsInvalid) (Syntax: 'num') Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null) Operand: IParameterReferenceExpression: num (OperationKind.ParameterReferenceExpression, Type: System.Int32, IsInvalid) (Syntax: 'num') - ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'Function(num) num') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'Function(num) num') + Statement: null IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'Function(num) num') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Boolean, IsInvalid) (Syntax: 'Function(num) num') ]]>.Value diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.vb index 549edd943f3..233f2e308bc 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.vb @@ -129,8 +129,8 @@ IBlockStatement (9 statements, 7 locals) (OperationKind.BlockStatement, IsInvali IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '""') Children(1): ILiteralExpression (OperationKind.LiteralExpression, Type: System.String, Constant: "", IsInvalid) (Syntax: '""') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb index 745f3c679c0..7d9372a513f 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb @@ -385,8 +385,8 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve Locals: Local_1: As System.Object IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x') ReturnedValue: IParameterReferenceExpression: x (OperationKind.ParameterReferenceExpression, Type: System.Object) (Syntax: 'x') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'Function() x') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'Function() x') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Function() x') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Object) (Syntax: 'Function() x') ]]>.Value diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb index 6ec963d505b..e4389baafd0 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb @@ -433,8 +433,8 @@ IWhileUntilLoopStatement (IsTopTest: True, IsWhile: True) (LoopKind.WhileUntil) Expression: ICompoundAssignmentExpression (BinaryOperationKind.IntegerAdd) (OperationKind.CompoundAssignmentExpression, Type: System.Int32) (Syntax: 'number += 1') Left: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number') Right: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1') - ILabelStatement (Label: Even) (OperationKind.LabelStatement) (Syntax: 'Even:') - LabeledStatement: null + ILabeledStatement (Label: Even) (OperationKind.LabeledStatement) (Syntax: 'Even:') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return number') ReturnedValue: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number') ]]>.Value diff --git a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_InvalidExpression.vb b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_InvalidExpression.vb index d777d2ff158..8ab0c30159b 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_InvalidExpression.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_InvalidExpression.vb @@ -287,8 +287,8 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve IInvocationExpression (Sub Program.F()) (OperationKind.InvocationExpression, Type: System.Void, IsInvalid) (Syntax: 'F()') Instance Receiver: null Arguments(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'Function() F()') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'Function() F()') + Statement: null IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'Function() F()') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: ?, IsInvalid) (Syntax: 'Function() F()')]]>.Value diff --git a/src/Compilers/VisualBasic/Test/Semantic/Semantics/AnonymousTypesTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Semantics/AnonymousTypesTests.vb index d08e07a0fe6..7e204c66d33 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Semantics/AnonymousTypesTests.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Semantics/AnonymousTypesTests.vb @@ -126,8 +126,8 @@ IBlockStatement (4 statements, 2 locals) (OperationKind.BlockStatement, IsInvali IArrayInitializer (1 elements) (OperationKind.ArrayInitializer, IsInvalid) (Syntax: '{tr}') Element Values(1): IParameterReferenceExpression: tr (OperationKind.ParameterReferenceExpression, Type: System.TypedReference, IsInvalid) (Syntax: 'tr') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -628,8 +628,8 @@ IBlockStatement (4 statements, 2 locals) (OperationKind.BlockStatement, IsInvali Initializer: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: ) (Syntax: 'New With {.<__>}') Initializers(1): IOperation: (OperationKind.None) (Syntax: '.<__>') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub') ReturnedValue: null ]]>.Value @@ -835,8 +835,8 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress Instance Receiver: IPropertyReferenceExpression: ReadOnly Property .x As System.String (Static) (OperationKind.PropertyReferenceExpression, Type: System.String, IsInvalid) (Syntax: '.x') Instance Receiver: null Arguments(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function') Arguments(0) @@ -889,8 +889,8 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress Children(1): IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '.a') Children(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function') Arguments(0) @@ -943,8 +943,8 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress Children(1): IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '.x') Children(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function') Arguments(0) @@ -1006,13 +1006,13 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress Children(1): IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '.x') Children(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function') Arguments(0) - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function') Arguments(0) diff --git a/src/Compilers/VisualBasic/Test/Semantic/Semantics/SelectCaseTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Semantics/SelectCaseTests.vb index c59efb3e28e..edc5963c4c7 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Semantics/SelectCaseTests.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Semantics/SelectCaseTests.vb @@ -597,8 +597,8 @@ ISwitchStatement (2 cases) (OperationKind.SwitchStatement) (Syntax: 'Select Case Locals: Local_1: As System.Int32 IReturnStatement (OperationKind.ReturnStatement) (Syntax: '5') ReturnedValue: ILiteralExpression (Text: 5) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 5) (Syntax: '5') - ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'Function() 5') - LabeledStatement: null + ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'Function() 5') + Statement: null IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Function() 5') ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'Function() 5') Body: diff --git a/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs b/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs index 25ba77ef569..2fb0930c03b 100644 --- a/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs +++ b/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs @@ -470,9 +470,9 @@ public override void VisitForEachLoopStatement(IForEachLoopStatement operation) Visit(operation.Body, "Body"); } - public override void VisitLabelStatement(ILabelStatement operation) + public override void VisitLabeledStatement(ILabeledStatement operation) { - LogString(nameof(ILabelStatement)); + LogString(nameof(ILabeledStatement)); // TODO: Put a better workaround to skip compiler generated labels. if (!operation.Label.IsImplicitlyDeclared) @@ -482,7 +482,7 @@ public override void VisitLabelStatement(ILabelStatement operation) LogCommonPropertiesAndNewLine(operation); - Visit(operation.LabeledStatement, "LabeledStatement"); + Visit(operation.Statement, "Statement"); } public override void VisitBranchStatement(IBranchStatement operation) diff --git a/src/Test/Utilities/Portable/Compilation/TestOperationWalker.cs b/src/Test/Utilities/Portable/Compilation/TestOperationWalker.cs index ae9cdd4978e..08bed01475c 100644 --- a/src/Test/Utilities/Portable/Compilation/TestOperationWalker.cs +++ b/src/Test/Utilities/Portable/Compilation/TestOperationWalker.cs @@ -129,11 +129,11 @@ public override void VisitForEachLoopStatement(IForEachLoopStatement operation) base.VisitForEachLoopStatement(operation); } - public override void VisitLabelStatement(ILabelStatement operation) + public override void VisitLabeledStatement(ILabeledStatement operation) { var label = operation.Label; - base.VisitLabelStatement(operation); + base.VisitLabeledStatement(operation); } public override void VisitBranchStatement(IBranchStatement operation) diff --git a/src/Test/Utilities/Portable/Diagnostics/OperationTestAnalyzer.cs b/src/Test/Utilities/Portable/Diagnostics/OperationTestAnalyzer.cs index dc3600b9ad6..2c723ce28e4 100644 --- a/src/Test/Utilities/Portable/Diagnostics/OperationTestAnalyzer.cs +++ b/src/Test/Utilities/Portable/Diagnostics/OperationTestAnalyzer.cs @@ -1468,13 +1468,13 @@ public sealed override void Initialize(AnalysisContext context) context.RegisterOperationAction( (operationContext) => { - ILabelSymbol label = ((ILabelStatement)operationContext.Operation).Label; + ILabelSymbol label = ((ILabeledStatement)operationContext.Operation).Label; if (label.Name == "Wilma" || label.Name == "Betty") { operationContext.ReportDiagnostic(Diagnostic.Create(LabelDescriptor, operationContext.Operation.Syntax.GetLocation())); } }, - OperationKind.LabelStatement); + OperationKind.LabeledStatement); context.RegisterOperationAction( (operationContext) => -- GitLab