提交 0b0e4906 编写于 作者: G Gen Lu

Merge remote-tracking branch 'dotnet/master' into stabilization

......@@ -24,7 +24,11 @@ try
# List of binary names that should be skipped because they have a known issue that
# makes them non-deterministic.
$skipList = @()
$skipList = @(
# https://github.com/dotnet/roslyn/issues/8739
"Microsoft.VisualStudio.ProjectSystem.Managed.dll"
)
$allGood = $true
$map = @{}
......
......@@ -67,7 +67,7 @@ ImmutableArray<IArgument> IInvocationExpression.ArgumentsInSourceOrder
IArgument IHasArgumentsExpression.GetArgumentMatchingParameter(IParameterSymbol parameter)
{
return ArgumentMatchingParameter(this.Arguments, this.ArgsToParamsOpt, this.ArgumentNamesOpt, this.ArgumentRefKindsOpt, parameter.ContainingSymbol as Symbols.MethodSymbol, parameter, this.Syntax);
return ArgumentMatchingParameter(this.Arguments, this.ArgsToParamsOpt, this.ArgumentNamesOpt, this.ArgumentRefKindsOpt, parameter.ContainingSymbol, ((Symbols.MethodSymbol)parameter.ContainingSymbol).Parameters, parameter, this.Syntax);
}
protected override OperationKind ExpressionKind => OperationKind.InvocationExpression;
......@@ -199,18 +199,18 @@ private static IOperation CreateParamArray(IParameterSymbol parameter, Immutable
return null;
}
internal static IArgument ArgumentMatchingParameter(ImmutableArray<BoundExpression> arguments, ImmutableArray<int> argumentsToParameters, ImmutableArray<string> argumentNames, ImmutableArray<RefKind> argumentRefKinds, Symbols.MethodSymbol targetMethod, IParameterSymbol parameter, SyntaxNode invocationSyntax)
internal static IArgument ArgumentMatchingParameter(ImmutableArray<BoundExpression> arguments, ImmutableArray<int> argumentsToParameters, ImmutableArray<string> argumentNames, ImmutableArray<RefKind> argumentRefKinds, ISymbol targetMethod, ImmutableArray<Symbols.ParameterSymbol> parameters, IParameterSymbol parameter, SyntaxNode invocationSyntax)
{
int argumentIndex = ArgumentIndexMatchingParameter(arguments, argumentsToParameters, targetMethod, parameter);
if (argumentIndex >= 0)
{
return DeriveArgument(parameter.Ordinal, argumentIndex, arguments, argumentNames, argumentRefKinds, targetMethod.Parameters, invocationSyntax);
return DeriveArgument(parameter.Ordinal, argumentIndex, arguments, argumentNames, argumentRefKinds, parameters, invocationSyntax);
}
return null;
}
private static int ArgumentIndexMatchingParameter(ImmutableArray<BoundExpression> arguments, ImmutableArray<int> argumentsToParameters, IMethodSymbol targetMethod, IParameterSymbol parameter)
private static int ArgumentIndexMatchingParameter(ImmutableArray<BoundExpression> arguments, ImmutableArray<int> argumentsToParameters, ISymbol targetMethod, IParameterSymbol parameter)
{
if (parameter.ContainingSymbol == targetMethod)
{
......@@ -346,6 +346,34 @@ public override void Accept(OperationVisitor visitor)
}
}
internal partial class BoundIndexerAccess : IIndexedPropertyReferenceExpression
{
IPropertySymbol IPropertyReferenceExpression.Property => this.Indexer;
IOperation IMemberReferenceExpression.Instance => this.Indexer.IsStatic ? null : this.ReceiverOpt;
ISymbol IMemberReferenceExpression.Member => this.Indexer;
ImmutableArray<IArgument> IHasArgumentsExpression.ArgumentsInParameterOrder => BoundCall.DeriveArguments(this.Arguments, this.ArgumentNamesOpt, this.ArgsToParamsOpt, this.ArgumentRefKindsOpt, this.Indexer.Parameters, this.Syntax);
IArgument IHasArgumentsExpression.GetArgumentMatchingParameter(IParameterSymbol parameter)
{
return BoundCall.ArgumentMatchingParameter(this.Arguments, this.ArgsToParamsOpt, this.ArgumentNamesOpt, this.ArgumentRefKindsOpt, this.Indexer, this.Indexer.Parameters, parameter, this.Syntax);
}
protected override OperationKind ExpressionKind => OperationKind.IndexedPropertyReferenceExpression;
public override void Accept(OperationVisitor visitor)
{
visitor.VisitIndexedPropertyReferenceExpression(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return visitor.VisitIndexedPropertyReferenceExpression(this, argument);
}
}
internal partial class BoundEventAccess : IEventReferenceExpression
{
IEventSymbol IEventReferenceExpression.Event => this.EventSymbol;
......@@ -473,7 +501,7 @@ internal partial class BoundObjectCreationExpression : IObjectCreationExpression
IArgument IHasArgumentsExpression.GetArgumentMatchingParameter(IParameterSymbol parameter)
{
return BoundCall.ArgumentMatchingParameter(this.Arguments, this.ArgsToParamsOpt, this.ArgumentNamesOpt, this.ArgumentRefKindsOpt, this.Constructor, parameter, this.Syntax);
return BoundCall.ArgumentMatchingParameter(this.Arguments, this.ArgsToParamsOpt, this.ArgumentNamesOpt, this.ArgumentRefKindsOpt, this.Constructor, this.Constructor.Parameters, parameter, this.Syntax);
}
ImmutableArray<ISymbolInitializer> IObjectCreationExpression.MemberInitializers
......@@ -761,22 +789,22 @@ public override void Accept(OperationVisitor visitor)
}
}
internal partial class BoundIsOperator : IIsExpression
internal partial class BoundIsOperator : IIsTypeExpression
{
IOperation IIsExpression.Operand => this.Operand;
IOperation IIsTypeExpression.Operand => this.Operand;
ITypeSymbol IIsExpression.IsType => this.TargetType.Type;
ITypeSymbol IIsTypeExpression.IsType => this.TargetType.Type;
protected override OperationKind ExpressionKind => OperationKind.IsExpression;
protected override OperationKind ExpressionKind => OperationKind.IsTypeExpression;
public override void Accept(OperationVisitor visitor)
{
visitor.VisitIsExpression(this);
visitor.VisitIsTypeExpression(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return visitor.VisitIsExpression(this, argument);
return visitor.VisitIsTypeExpression(this, argument);
}
}
......@@ -1058,9 +1086,9 @@ internal partial class BoundBinaryOperator : IBinaryOperatorExpression
{
BinaryOperationKind IBinaryOperatorExpression.BinaryOperationKind => Expression.DeriveBinaryOperationKind(this.OperatorKind);
IOperation IBinaryOperatorExpression.Left => this.Left;
IOperation IBinaryOperatorExpression.LeftOperand => this.Left;
IOperation IBinaryOperatorExpression.Right => this.Right;
IOperation IBinaryOperatorExpression.RightOperand => this.Right;
bool IHasOperatorMethodExpression.UsesOperatorMethod => (this.OperatorKind & BinaryOperatorKind.TypeMask) == BinaryOperatorKind.UserDefined;
......@@ -1130,9 +1158,9 @@ public override void Accept(OperationVisitor visitor)
internal partial class BoundNullCoalescingOperator : INullCoalescingExpression
{
IOperation INullCoalescingExpression.Primary => this.LeftOperand;
IOperation INullCoalescingExpression.PrimaryOperand => this.LeftOperand;
IOperation INullCoalescingExpression.Secondary => this.RightOperand;
IOperation INullCoalescingExpression.SecondaryOperand => this.RightOperand;
protected override OperationKind ExpressionKind => OperationKind.NullCoalescingExpression;
......@@ -1236,7 +1264,9 @@ public override void Accept(OperationVisitor visitor)
internal partial class BoundConditionalAccess : IConditionalAccessExpression
{
IOperation IConditionalAccessExpression.Access => this.AccessExpression;
IOperation IConditionalAccessExpression.ConditionalValue => this.AccessExpression;
IOperation IConditionalAccessExpression.ConditionalInstance => this.Receiver;
protected override OperationKind ExpressionKind => OperationKind.ConditionalAccessExpression;
......@@ -1251,6 +1281,21 @@ public override void Accept(OperationVisitor visitor)
}
}
internal partial class BoundConditionalReceiver : IConditionalAccessInstanceExpression
{
protected override OperationKind ExpressionKind => OperationKind.ConditionalAccessInstanceExpression;
public override void Accept(OperationVisitor visitor)
{
visitor.VisitConditionalAccessInstanceExpression(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return visitor.VisitConditionalAccessInstanceExpression(this, argument);
}
}
internal partial class BoundEqualsValue : ISymbolInitializer
{
IOperation ISymbolInitializer.Value => this.Value;
......@@ -1563,21 +1608,6 @@ public override void Accept(OperationVisitor visitor)
}
}
internal partial class BoundIndexerAccess
{
protected override OperationKind ExpressionKind => OperationKind.None;
public override void Accept(OperationVisitor visitor)
{
visitor.VisitNoneOperation(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return visitor.VisitNoneOperation(this, argument);
}
}
internal partial class BoundSequencePointExpression
{
protected override OperationKind ExpressionKind => OperationKind.None;
......@@ -1847,22 +1877,7 @@ public override void Accept(OperationVisitor visitor)
return visitor.VisitNoneOperation(this, argument);
}
}
internal partial class BoundConditionalReceiver
{
protected override OperationKind ExpressionKind => OperationKind.None;
public override void Accept(OperationVisitor visitor)
{
visitor.VisitNoneOperation(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return visitor.VisitNoneOperation(this, argument);
}
}
internal partial class BoundDynamicCollectionElementInitializer
{
protected override OperationKind ExpressionKind => OperationKind.None;
......@@ -2084,7 +2099,7 @@ internal static BinaryOperationKind DeriveBinaryOperationKind(UnaryOperationKind
return BinaryOperationKind.DynamicSubtract;
default:
throw ExceptionUtilities.UnexpectedValue(incrementKind);
return BinaryOperationKind.Invalid;
}
}
......@@ -2311,7 +2326,7 @@ internal static UnaryOperationKind DeriveUnaryOperationKind(UnaryOperatorKind op
break;
}
throw ExceptionUtilities.UnexpectedValue(operatorKind & UnaryOperatorKind.TypeMask);
return UnaryOperationKind.Invalid;
}
internal static BinaryOperationKind DeriveBinaryOperationKind(BinaryOperatorKind operatorKind)
......@@ -2733,7 +2748,7 @@ internal static BinaryOperationKind DeriveBinaryOperationKind(BinaryOperatorKind
break;
}
throw ExceptionUtilities.UnexpectedValue(operatorKind & BinaryOperatorKind.TypeMask);
return BinaryOperationKind.Invalid;
}
}
}
......@@ -385,8 +385,10 @@ BinaryOperationKind ISingleValueCaseClause.Equality
{
return BinaryOperationKind.EnumEquals;
}
}
return BinaryOperationKind.Invalid;
}
// Return None for `default` case.
return BinaryOperationKind.None;
}
}
......@@ -485,33 +487,24 @@ public override void Accept(OperationVisitor visitor)
}
}
internal partial class BoundUsingStatement : IUsingWithDeclarationStatement, IUsingWithExpressionStatement
internal partial class BoundUsingStatement : IUsingStatement
{
IVariableDeclarationStatement IUsingWithDeclarationStatement.Declaration => this.DeclarationsOpt;
IVariableDeclarationStatement IUsingStatement.Declaration => this.DeclarationsOpt;
IOperation IUsingWithExpressionStatement.Value => this.ExpressionOpt;
IOperation IUsingStatement.Value => this.ExpressionOpt;
IOperation IUsingStatement.Body => this.Body;
protected override OperationKind StatementKind => this.ExpressionOpt != null ? OperationKind.UsingWithExpressionStatement : OperationKind.UsingWithDeclarationStatement;
protected override OperationKind StatementKind => OperationKind.UsingStatement;
public override void Accept(OperationVisitor visitor)
{
if (this.StatementKind == OperationKind.UsingWithExpressionStatement)
{
visitor.VisitUsingWithExpressionStatement(this);
}
else
{
visitor.VisitUsingWithDeclarationStatement(this);
}
visitor.VisitUsingStatement(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return this.StatementKind == OperationKind.UsingWithExpressionStatement
? visitor.VisitUsingWithExpressionStatement(this, argument)
: visitor.VisitUsingWithDeclarationStatement(this, argument);
return visitor.VisitUsingStatement(this, argument);
}
}
......
......@@ -21,63 +21,19 @@ internal AssemblyReference(AssemblySymbol assemblySymbol)
_targetAssembly = assemblySymbol;
}
public AssemblyIdentity MetadataIdentity => _targetAssembly.Identity;
public AssemblyIdentity Identity => _targetAssembly.Identity;
public override string ToString()
{
return _targetAssembly.ToString();
}
#region Cci.IAssemblyReference
void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
{
visitor.Visit(this);
}
string Cci.IAssemblyReference.Culture
{
get
{
return MetadataIdentity.CultureName;
}
}
bool Cci.IAssemblyReference.IsRetargetable
{
get
{
return MetadataIdentity.IsRetargetable;
}
}
AssemblyContentType Cci.IAssemblyReference.ContentType
{
get
{
return MetadataIdentity.ContentType;
}
}
ImmutableArray<byte> Cci.IAssemblyReference.PublicKeyToken
{
get { return MetadataIdentity.PublicKeyToken; }
}
Version Cci.IAssemblyReference.Version
{
get { return MetadataIdentity.Version; }
}
string Cci.IAssemblyReference.GetDisplayName()
{
return MetadataIdentity.GetDisplayName();
}
string Cci.INamedEntity.Name
{
get { return MetadataIdentity.Name; }
}
string Cci.INamedEntity.Name => Identity.Name;
Cci.IAssemblyReference Cci.IModuleReference.GetContainingAssembly(CodeAnalysis.Emit.EmitContext context)
{
......@@ -93,7 +49,5 @@ Cci.IDefinition Cci.IReference.AsDefinition(CodeAnalysis.Emit.EmitContext contex
{
return null;
}
#endregion
}
}
......@@ -161,44 +161,7 @@ protected override void AddEmbeddedResourcesFromAddedModules(ArrayBuilder<Cci.Ma
}
}
string Cci.IAssemblyReference.Culture
{
get
{
return _sourceAssembly.Identity.CultureName;
}
}
bool Cci.IAssemblyReference.IsRetargetable
{
get
{
return _sourceAssembly.Identity.IsRetargetable;
}
}
AssemblyContentType Cci.IAssemblyReference.ContentType
{
get
{
return _sourceAssembly.Identity.ContentType;
}
}
ImmutableArray<byte> Cci.IAssemblyReference.PublicKeyToken
{
get { return _sourceAssembly.Identity.PublicKeyToken; }
}
Version Cci.IAssemblyReference.Version
{
get { return _sourceAssembly.Identity.Version; }
}
string Cci.IAssemblyReference.GetDisplayName()
{
return _sourceAssembly.Identity.GetDisplayName();
}
AssemblyIdentity Cci.IAssemblyReference.Identity => _sourceAssembly.Identity;
internal override string Name
{
......
......@@ -6,6 +6,7 @@
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.PortableExecutable;
using System.Threading;
using Microsoft.CodeAnalysis.CodeGen;
......@@ -136,10 +137,10 @@ protected override IEnumerable<Cci.IAssemblyReference> GetAssemblyReferencesFrom
private void ValidateReferencedAssembly(AssemblySymbol assembly, AssemblyReference asmRef, DiagnosticBag diagnostics)
{
AssemblyIdentity asmIdentity = SourceModule.ContainingAssembly.Identity;
AssemblyIdentity refIdentity = asmRef.MetadataIdentity;
AssemblyIdentity refIdentity = asmRef.Identity;
if (asmIdentity.IsStrongName && !refIdentity.IsStrongName &&
((Cci.IAssemblyReference)asmRef).ContentType != System.Reflection.AssemblyContentType.WindowsRuntime)
asmRef.Identity.ContentType != AssemblyContentType.WindowsRuntime)
{
// Dev12 reported error, we have changed it to a warning to allow referencing libraries
// built for platforms that don't support strong names.
......
......@@ -1444,5 +1444,98 @@ public void M1()
Diagnostic(NullOperationSyntaxTestAnalyzer.ParamsArrayOperationDescriptor.Id, "1").WithLocation(11, 12),
Diagnostic(NullOperationSyntaxTestAnalyzer.ParamsArrayOperationDescriptor.Id, "1").WithLocation(12, 12));
}
[WorkItem(8114, "https://github.com/dotnet/roslyn/issues/8114")]
[Fact]
public void InvalidOperatorCSharp()
{
const string source = @"
public class A
{
public bool Compare(float f)
{
return f == float.Nan; // Misspelled
}
public string Negate(string f)
{
return -f;
}
public void Increment(string f)
{
f++;
}
}
";
CreateCompilationWithMscorlib45(source)
.VerifyDiagnostics(
Diagnostic(ErrorCode.ERR_NoSuchMember, "Nan").WithArguments("float", "Nan").WithLocation(6, 27),
Diagnostic(ErrorCode.ERR_BadUnaryOp, "-f").WithArguments("-", "string").WithLocation(11, 16),
Diagnostic(ErrorCode.ERR_BadUnaryOp, "f++").WithArguments("++", "string").WithLocation(16, 9))
.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new InvalidOperatorExpressionTestAnalyzer() }, null, null, false,
Diagnostic(InvalidOperatorExpressionTestAnalyzer.InvalidBinaryDescriptor.Id, "f == float.Nan").WithLocation(6, 16),
Diagnostic(InvalidOperatorExpressionTestAnalyzer.InvalidUnaryDescriptor.Id, "-f").WithLocation(11, 16),
Diagnostic(InvalidOperatorExpressionTestAnalyzer.InvalidIncrementDescriptor.Id, "f++").WithLocation(16, 9));
}
[Fact]
public void ConditionalAccessOperationsCSharp()
{
const string source = @"
class C
{
public int Prop { get; set; }
public int Field;
public int this[int i]
{
get
{
return this.Field;
}
set
{
this.Field = value;
}
}
public C Field1 = null;
public void M0(C p)
{
var x = p?.Prop;
x = p?.Field;
x = p?[0];
p?.M0(null);
x = Field1?.Prop;
x = Field1?.Field;
x = Field1?[0];
Field1?.M0(null);
}
}
";
CreateCompilationWithMscorlib45(source)
.VerifyDiagnostics()
.VerifyAnalyzerDiagnostics(new DiagnosticAnalyzer[] { new ConditionalAccessOperationTestAnalyzer() }, null, null, false,
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?.Prop").WithLocation(24, 17),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p").WithLocation(24, 17),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?.Field").WithLocation(25, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p").WithLocation(25, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?[0]").WithLocation(26, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p").WithLocation(26, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?.M0(null)").WithLocation(27, 9),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p").WithLocation(27, 9),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?.Prop").WithLocation(29, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1").WithLocation(29, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?.Field").WithLocation(30, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1").WithLocation(30, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?[0]").WithLocation(31, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1").WithLocation(31, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?.M0(null)").WithLocation(32, 9),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1").WithLocation(32, 9));
}
}
}
\ No newline at end of file
......@@ -145,8 +145,8 @@ public sealed override void Initialize(AnalysisContext context)
if (forCondition.Kind == OperationKind.BinaryOperatorExpression)
{
IBinaryOperatorExpression condition = (IBinaryOperatorExpression)forCondition;
IOperation conditionLeft = condition.Left;
IOperation conditionRight = condition.Right;
IOperation conditionLeft = condition.LeftOperand;
IOperation conditionRight = condition.RightOperand;
if (conditionRight.ConstantValue.HasValue &&
conditionRight.Type.SpecialType == SpecialType.System_Int32 &&
......@@ -194,13 +194,13 @@ public sealed override void Initialize(AnalysisContext context)
IBinaryOperatorExpression advanceOperation = (IBinaryOperatorExpression)advanceAssignment.Value;
if (!advanceOperation.UsesOperatorMethod &&
advanceOperation.Left.Kind == OperationKind.LocalReferenceExpression &&
((ILocalReferenceExpression)advanceOperation.Left).Local == testVariable &&
advanceOperation.Right.ConstantValue.HasValue &&
advanceOperation.Right.Type.SpecialType == SpecialType.System_Int32)
advanceOperation.LeftOperand.Kind == OperationKind.LocalReferenceExpression &&
((ILocalReferenceExpression)advanceOperation.LeftOperand).Local == testVariable &&
advanceOperation.RightOperand.ConstantValue.HasValue &&
advanceOperation.RightOperand.Type.SpecialType == SpecialType.System_Int32)
{
// Advance binary operation is known to involve a reference to the local used in the test and a constant.
advanceIncrement = advanceOperation.Right;
advanceIncrement = advanceOperation.RightOperand;
advanceOperationCode = advanceOperation.BinaryOperationKind;
}
}
......@@ -1525,9 +1525,8 @@ public sealed override void Initialize(AnalysisContext context)
Diagnostic.Create(ParamsArrayOperationDescriptor,
paramsarrayArgumentOperation.Syntax.GetLocation()));
}
},
OperationKind.InvocationExpression);
OperationKind.InvocationExpression);
}
// this OperationWalker collect:
......@@ -1564,4 +1563,127 @@ public override void Visit(IOperation operation)
}
}
}
public class InvalidOperatorExpressionTestAnalyzer : DiagnosticAnalyzer
{
private const string ReliabilityCategory = "Reliability";
public static readonly DiagnosticDescriptor InvalidBinaryDescriptor = new DiagnosticDescriptor(
"InvalidBinary",
"Invalid binary expression operation with BinaryOperationKind.Invalid",
"An Invalid binary expression operation with BinaryOperationKind.Invalid is found",
ReliabilityCategory,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
public static readonly DiagnosticDescriptor InvalidUnaryDescriptor = new DiagnosticDescriptor(
"InvalidUnary",
"Invalid unary expression operation with UnaryOperationKind.Invalid",
"An Invalid unary expression operation with UnaryOperationKind.Invalid is found",
ReliabilityCategory,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
public static readonly DiagnosticDescriptor InvalidIncrementDescriptor = new DiagnosticDescriptor(
"InvalidIncrement",
"Invalid increment expression operation with ICompoundAssignmentExpression.BinaryOperationKind == BinaryOperationKind.Invalid",
"An Invalid increment expression operation with ICompoundAssignmentExpression.BinaryOperationKind == BinaryOperationKind.Invalid is found",
ReliabilityCategory,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(InvalidBinaryDescriptor,
InvalidUnaryDescriptor,
InvalidIncrementDescriptor);
public sealed override void Initialize(AnalysisContext context)
{
context.RegisterOperationAction(
(operationContext) =>
{
var operation = operationContext.Operation;
if (operation.Kind == OperationKind.BinaryOperatorExpression)
{
var binary = (IBinaryOperatorExpression)operation;
if (binary.IsInvalid && binary.BinaryOperationKind == BinaryOperationKind.Invalid)
{
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidBinaryDescriptor, binary.Syntax.GetLocation()));
}
}
else if (operation.Kind == OperationKind.UnaryOperatorExpression)
{
var unary = (IUnaryOperatorExpression)operation;
if (unary.IsInvalid && unary.UnaryOperationKind == UnaryOperationKind.Invalid)
{
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidUnaryDescriptor, unary.Syntax.GetLocation()));
}
}
else if (operation.Kind == OperationKind.IncrementExpression)
{
var inc = (IIncrementExpression)operation;
if (inc.IsInvalid && inc.BinaryOperationKind == BinaryOperationKind.Invalid)
{
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidIncrementDescriptor, inc.Syntax.GetLocation()));
}
}
},
OperationKind.BinaryOperatorExpression,
OperationKind.UnaryOperatorExpression,
OperationKind.IncrementExpression);
}
}
public class ConditionalAccessOperationTestAnalyzer : DiagnosticAnalyzer
{
public static readonly DiagnosticDescriptor ConditionalAccessOperationDescriptor = new DiagnosticDescriptor(
"ConditionalAccessOperation",
"Conditional access operation found",
"Conditional access operation was found",
"Testing",
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
public static readonly DiagnosticDescriptor ConditionalAccessInstanceOperationDescriptor = new DiagnosticDescriptor(
"ConditionalAccessInstanceOperation",
"Conditional access instance operation found",
"Conditional access instance operation was found",
"Testing",
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
get { return ImmutableArray.Create(ConditionalAccessOperationDescriptor, ConditionalAccessInstanceOperationDescriptor); }
}
public sealed override void Initialize(AnalysisContext context)
{
context.RegisterOperationAction(
(operationContext) =>
{
IConditionalAccessExpression conditionalAccess = (IConditionalAccessExpression)operationContext.Operation;
if (conditionalAccess.ConditionalValue != null && conditionalAccess.ConditionalInstance != null)
{
operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessOperationDescriptor, conditionalAccess.Syntax.GetLocation()));
}
},
OperationKind.ConditionalAccessExpression);
context.RegisterOperationAction(
(operationContext) =>
{
IConditionalAccessInstanceExpression conditionalAccessInstance = (IConditionalAccessInstanceExpression)operationContext.Operation;
operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessInstanceOperationDescriptor, conditionalAccessInstance.Syntax.GetLocation()));
},
OperationKind.ConditionalAccessInstanceExpression);
context.RegisterOperationAction(
(operationContext) =>
{
IPlaceholderExpression placeholder = (IPlaceholderExpression)operationContext.Operation;
operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessInstanceOperationDescriptor, placeholder.Syntax.GetLocation()));
},
OperationKind.PlaceholderExpression);
}
}
}
\ No newline at end of file
......@@ -74,10 +74,10 @@ public static BinaryOperationKind DeriveAdditionKind(ITypeSymbol type)
if (type.TypeKind == TypeKind.Enum)
{
return Semantics.BinaryOperationKind.EnumAdd;
return BinaryOperationKind.EnumAdd;
}
return Semantics.BinaryOperationKind.None;
return BinaryOperationKind.Invalid;
}
}
......@@ -334,17 +334,17 @@ internal sealed class Binary : IBinaryOperatorExpression
public Binary(BinaryOperationKind binaryOperationKind, IOperation left, IOperation right, ITypeSymbol resultType, SyntaxNode syntax)
{
this.BinaryOperationKind = binaryOperationKind;
this.Left = left;
this.Right = right;
this.LeftOperand = left;
this.RightOperand = right;
this.Type = resultType;
this.Syntax = syntax;
}
public BinaryOperationKind BinaryOperationKind { get; }
public IOperation Left { get; }
public IOperation LeftOperand { get; }
public IOperation Right { get; }
public IOperation RightOperand { get; }
public bool UsesOperatorMethod => false;
......@@ -354,7 +354,7 @@ public Binary(BinaryOperationKind binaryOperationKind, IOperation left, IOperati
public OperationKind Kind => OperationKind.BinaryOperatorExpression;
public bool IsInvalid => Left == null || Left.IsInvalid || Right == null || Right.IsInvalid;
public bool IsInvalid => LeftOperand == null || LeftOperand.IsInvalid || RightOperand == null || RightOperand.IsInvalid;
public Optional<object> ConstantValue => default(Optional<object>);
......
......@@ -263,6 +263,13 @@ public interface IPropertyReferenceExpression : IMemberReferenceExpression
IPropertySymbol Property { get; }
}
/// <summary>
/// Represents a reference to an indexed property.
/// </summary>
public interface IIndexedPropertyReferenceExpression : IPropertyReferenceExpression, IHasArgumentsExpression
{
}
/// <summary>
/// Represents a reference to an event.
/// </summary>
......@@ -301,14 +308,33 @@ public interface IEventAssignmentExpression : IOperation
}
/// <summary>
/// Represents a conditional access expression.
/// Represents an expression that includes a ? or ?. conditional access instance expression.
/// </summary>
public interface IConditionalAccessExpression : IOperation
{
/// <summary>
/// Expression subject to conditional access.
/// Expression to be evaluated if the conditional instance is non null.
/// </summary>
IOperation ConditionalValue { get; }
/// <summary>
/// Expresson that is conditionally accessed.
/// </summary>
IOperation Access { get; }
IOperation ConditionalInstance { get; }
}
/// <summary>
/// Represents the value of a conditionally-accessed expression within an expression containing a conditional access.
/// </summary>
public interface IConditionalAccessInstanceExpression : IOperation
{
}
/// <summary>
/// Represents a general placeholder when no more specific kind of placeholder is available.
/// A placeholder is an expression whose meaning is inferred from context.
/// </summary>
public interface IPlaceholderExpression : IOperation
{
}
/// <summary>
......@@ -355,7 +381,9 @@ public enum SimpleUnaryOperationKind
Minus = 0x8,
True = 0x9,
False = 0xa,
BitwiseOrLogicalNot = 0xb
BitwiseOrLogicalNot = 0xb,
Invalid = 0xff
}
public enum UnaryOperandKind
......@@ -371,7 +399,9 @@ public enum UnaryOperandKind
Enum = 0x700,
Dynamic = 0x800,
Object = 0x900,
Pointer = 0xa00
Pointer = 0xa00,
Invalid = 0xff00
}
/// <summary>
......@@ -445,7 +475,9 @@ public enum UnaryOperationKind
ObjectPlus = UnaryOperandKind.Object | SimpleUnaryOperationKind.Plus,
ObjectMinus = UnaryOperandKind.Object | SimpleUnaryOperationKind.Minus,
ObjectNot = UnaryOperandKind.Object | SimpleUnaryOperationKind.BitwiseOrLogicalNot
ObjectNot = UnaryOperandKind.Object | SimpleUnaryOperationKind.BitwiseOrLogicalNot,
Invalid = UnaryOperandKind.Invalid | SimpleUnaryOperationKind.Invalid
}
......@@ -461,11 +493,11 @@ public interface IBinaryOperatorExpression : IHasOperatorMethodExpression
/// <summary>
/// Left operand.
/// </summary>
IOperation Left { get; }
IOperation LeftOperand { get; }
/// <summary>
/// Right operand.
/// </summary>
IOperation Right { get; }
IOperation RightOperand { get; }
}
public enum SimpleBinaryOperationKind
......@@ -499,7 +531,9 @@ public enum SimpleBinaryOperationKind
GreaterThanOrEqual = 0x16,
GreaterThan = 0x17,
Like = 0x18
Like = 0x18,
Invalid = 0xff
}
public enum BinaryOperandsKind
......@@ -520,7 +554,9 @@ public enum BinaryOperandsKind
IntegerPointer = 0xc00,
String = 0xd00,
Delegate = 0xe00,
Nullable = 0xf00
Nullable = 0xf00,
Invalid = 0xff00
}
/// <summary>
......@@ -700,7 +736,9 @@ public enum BinaryOperationKind
DynamicLessThan = BinaryOperandsKind.Dynamic | SimpleBinaryOperationKind.LessThan,
DynamicLessThanOrEqual = BinaryOperandsKind.Dynamic | SimpleBinaryOperationKind.LessThanOrEqual,
DynamicGreaterThanOrEqual = BinaryOperandsKind.Dynamic | SimpleBinaryOperationKind.GreaterThanOrEqual,
DynamicGreaterThan = BinaryOperandsKind.Dynamic | SimpleBinaryOperationKind.GreaterThan
DynamicGreaterThan = BinaryOperandsKind.Dynamic | SimpleBinaryOperationKind.GreaterThan,
Invalid = BinaryOperandsKind.Invalid | SimpleBinaryOperationKind.Invalid
}
public static class UnaryAndBinaryOperationExtensions
......@@ -869,17 +907,17 @@ public interface INullCoalescingExpression : IOperation
/// <summary>
/// Value to be unconditionally evaluated.
/// </summary>
IOperation Primary { get; }
IOperation PrimaryOperand { get; }
/// <summary>
/// Value to be evaluated if Primary evaluates to null/Nothing.
/// </summary>
IOperation Secondary { get; }
IOperation SecondaryOperand { get; }
}
/// <summary>
/// Represents an expression that tests if a value is of a specific type.
/// </summary>
public interface IIsExpression : IOperation
public interface IIsTypeExpression : IOperation
{
/// <summary>
/// Value to test.
......
......@@ -46,6 +46,8 @@ public enum OperationKind
{
None = 0x0,
// Statements
/// <summary>Indicates an <see cref="IInvalidStatement"/>.</summary>
InvalidStatement = 0x1,
/// <summary>Indicates an <see cref="IBlockStatement"/>.</summary>
......@@ -58,150 +60,163 @@ public enum OperationKind
IfStatement = 0x5,
/// <summary>Indicates an <see cref="ILoopStatement"/>.</summary>
LoopStatement = 0x6,
/// <summary>Indicates an <see cref="IReturnStatement"/>.</summary>
YieldBreakStatement = 0x9,
/// <summary>Indicates an <see cref="ILabelStatement"/>.</summary>
LabelStatement = 0xa,
LabelStatement = 0x7,
/// <summary>Indicates an <see cref="IBranchStatement"/>.</summary>
BranchStatement = 0xc,
BranchStatement = 0x8,
/// <summary>Indicates an <see cref="IEmptyStatement"/>.</summary>
EmptyStatement = 0xd,
EmptyStatement = 0x9,
/// <summary>Indicates an <see cref="IThrowStatement"/>.</summary>
ThrowStatement = 0xe,
ThrowStatement = 0xa,
/// <summary>Indicates an <see cref="IReturnStatement"/>.</summary>
ReturnStatement = 0xb,
/// <summary>Indicates an <see cref="IReturnStatement"/>.</summary>
ReturnStatement = 0xf,
YieldBreakStatement = 0xc,
/// <summary>Indicates an <see cref="ILockStatement"/>.</summary>
LockStatement = 0x10,
LockStatement = 0xd,
/// <summary>Indicates an <see cref="ITryStatement"/>.</summary>
TryStatement = 0x11,
/// <summary>Indicates an <see cref="ICatchClause"/>.</summary>
CatchClause = 0x12,
/// <summary>Indicates an <see cref="IUsingWithDeclarationStatement"/>.</summary>
UsingWithDeclarationStatement = 0x13,
/// <summary>Indicates an <see cref="IUsingWithExpressionStatement"/>.</summary>
UsingWithExpressionStatement = 0x14,
TryStatement = 0xe,
/// <summary>Indicates an <see cref="IUsingStatement"/>.</summary>
UsingStatement = 0xf,
/// <summary>Indicates an <see cref="IReturnStatement"/>.</summary>
YieldReturnStatement = 0x15,
YieldReturnStatement = 0x10,
/// <summary>Indicates an <see cref="IExpressionStatement"/>.</summary>
ExpressionStatement = 0x11,
// Statements that occur only C#.
/// <summary>Indicates an <see cref="IFixedStatement"/>.</summary>
FixedStatement = 0x16,
// LocalFunctionStatement = 0x17,
FixedStatement = 0x30,
/// <summary>Indicates an <see cref="IExpressionStatement"/>.</summary>
ExpressionStatement = 0x18,
// Statements that occur only in Visual Basic.
/// <summary>Indicates an <see cref="IStopStatement"/>.</summary>
StopStatement = 0x50,
/// <summary>Indicates an <see cref="IEndStatement"/>.</summary>
EndStatement = 0x51,
/// <summary>Indicates an <see cref="IWithStatement"/>.</summary>
WithStatement = 0x52,
// Expressions
/// <summary>Indicates an <see cref="IInvalidExpression"/>.</summary>
InvalidExpression = 0x19,
InvalidExpression = 0x100,
/// <summary>Indicates an <see cref="ILiteralExpression"/>.</summary>
LiteralExpression = 0x1a,
LiteralExpression = 0x101,
/// <summary>Indicates an <see cref="IConversionExpression"/>.</summary>
ConversionExpression = 0x1b,
ConversionExpression = 0x102,
/// <summary>Indicates an <see cref="IInvocationExpression"/>.</summary>
InvocationExpression = 0x1c,
InvocationExpression = 0x103,
/// <summary>Indicates an <see cref="IArrayElementReferenceExpression"/>.</summary>
ArrayElementReferenceExpression = 0x1d,
/// <summary>Indicates an <see cref="IPointerIndirectionReferenceExpression"/>.</summary>
PointerIndirectionReferenceExpression = 0x1e,
ArrayElementReferenceExpression = 0x104,
/// <summary>Indicates an <see cref="ILocalReferenceExpression"/>.</summary>
LocalReferenceExpression = 0x1f,
LocalReferenceExpression = 0x105,
/// <summary>Indicates an <see cref="IParameterReferenceExpression"/>.</summary>
ParameterReferenceExpression = 0x20,
ParameterReferenceExpression = 0x106,
/// <summary>Indicates an <see cref="ISyntheticLocalReferenceExpression"/>.</summary>
SyntheticLocalReferenceExpression = 0x21,
SyntheticLocalReferenceExpression = 0x107,
/// <summary>Indicates an <see cref="IFieldReferenceExpression"/>.</summary>
FieldReferenceExpression = 0x22,
FieldReferenceExpression = 0x108,
/// <summary>Indicates an <see cref="IMethodBindingExpression"/>.</summary>
MethodBindingExpression = 0x23,
MethodBindingExpression = 0x109,
/// <summary>Indicates an <see cref="IPropertyReferenceExpression"/>.</summary>
PropertyReferenceExpression = 0x24,
PropertyReferenceExpression = 0x10a,
/// <summary>Indicates an <see cref="IIndexedPropertyReferenceExpression"/>.</summary>
IndexedPropertyReferenceExpression = 0x10b,
/// <summary>Indicates an <see cref="IEventReferenceExpression"/>.</summary>
EventReferenceExpression = 0x25,
/// <summary>Indicates an <see cref="ILateBoundMemberReferenceExpression"/>.</summary>
LateBoundMemberReferenceExpression = 0x26,
EventReferenceExpression = 0x10c,
/// <summary>Indicates an <see cref="IUnaryOperatorExpression"/>.</summary>
UnaryOperatorExpression = 0x27,
UnaryOperatorExpression = 0x10d,
/// <summary>Indicates an <see cref="IBinaryOperatorExpression"/>.</summary>
BinaryOperatorExpression = 0x28,
BinaryOperatorExpression = 0x10e,
/// <summary>Indicates an <see cref="IConditionalChoiceExpression"/>.</summary>
ConditionalChoiceExpression = 0x29,
ConditionalChoiceExpression = 0x10f,
/// <summary>Indicates an <see cref="INullCoalescingExpression"/>.</summary>
NullCoalescingExpression = 0x2a,
NullCoalescingExpression = 0x110,
/// <summary>Indicates an <see cref="ILambdaExpression"/>.</summary>
LambdaExpression = 0x2b,
LambdaExpression = 0x111,
/// <summary>Indicates an <see cref="IObjectCreationExpression"/>.</summary>
ObjectCreationExpression = 0x2c,
ObjectCreationExpression = 0x112,
/// <summary>Indicates an <see cref="ITypeParameterObjectCreationExpression"/>.</summary>
TypeParameterObjectCreationExpression = 0x2d,
TypeParameterObjectCreationExpression = 0x113,
/// <summary>Indicates an <see cref="IArrayCreationExpression"/>.</summary>
ArrayCreationExpression = 0x2e,
/// <summary>Indicates an <see cref="IDefaultValueExpression"/>.</summary>
DefaultValueExpression = 0x2f,
ArrayCreationExpression = 0x114,
/// <summary>Indicates an <see cref="IInstanceReferenceExpression"/>.</summary>
InstanceReferenceExpression = 0x30,
/// <summary>Indicates an <see cref="IIsExpression"/>.</summary>
IsExpression = 0x33,
// TypeOperationExpression = 0x34,
AwaitExpression = 0x35,
/// <summary>Indicates an <see cref="IAddressOfExpression"/>.</summary>
AddressOfExpression = 0x36,
InstanceReferenceExpression = 0x115,
/// <summary>Indicates an <see cref="IIsTypeExpression"/>.</summary>
IsTypeExpression = 0x116,
/// <summary>Indicates an <see cref="IAwaitExpression"/>.</summary>
AwaitExpression = 0x117,
/// <summary>Indicates an <see cref="IAssignmentExpression"/>.</summary>
AssignmentExpression = 0x37,
AssignmentExpression = 0x118,
/// <summary>Indicates an <see cref="ICompoundAssignmentExpression"/>.</summary>
CompoundAssignmentExpression = 0x38,
CompoundAssignmentExpression = 0x119,
/// <summary>Indicates an <see cref="IParenthesizedExpression"/>.</summary>
ParenthesizedExpression = 0x39,
/// <summary>Indicates an <see cref="IUnboundLambdaExpression"/>.</summary>
UnboundLambdaExpression = 0x3a,
ParenthesizedExpression = 0x11a,
/// <summary>Indicates an <see cref="IEventAssignmentExpression"/>.</summary>
EventAssignmentExpression = 0x3b,
EventAssignmentExpression = 0x11b,
/// <summary>Indicates an <see cref="IConditionalAccessExpression"/>.</summary>
ConditionalAccessExpression = 0x11c,
/// <summary>Indicates an <see cref="IConditionalAccessInstanceExpression"/>.</summary>
ConditionalAccessInstanceExpression = 0x11d,
// Expressions that occur only in C#.
/// <summary>Indicates an <see cref="IDefaultValueExpression"/>.</summary>
DefaultValueExpression = 0x200,
/// <summary>Indicates an <see cref="ITypeOfExpression"/>.</summary>
TypeOfExpression = 0x34,
TypeOfExpression = 0x201,
/// <summary>Indicates an <see cref="ISizeOfExpression"/>.</summary>
SizeOfExpression = 0x50,
SizeOfExpression = 0x202,
/// <summary>Indicates an <see cref="IAddressOfExpression"/>.</summary>
AddressOfExpression = 0x203,
/// <summary>Indicates an <see cref="IPointerIndirectionReferenceExpression"/>.</summary>
PointerIndirectionReferenceExpression = 0x204,
/// <summary>Indicates an <see cref="IUnboundLambdaExpression"/>.</summary>
UnboundLambdaExpression = 0x205,
/// <summary>Indicates an <see cref="IIncrementExpression"/>.</summary>
IncrementExpression = 0x206,
// VB only
// Expressions that occur only in Visual Basic.
/// <summary>Indicates an <see cref="IOmittedArgumentExpression"/>.</summary>
OmittedArgumentExpression = 0x3c,
/// <summary>Indicates an <see cref="IStopStatement"/>.</summary>
StopStatement = 0x3d,
/// <summary>Indicates an <see cref="IEndStatement"/>.</summary>
EndStatement = 0x3e,
/// <summary>Indicates an <see cref="IWithStatement"/>.</summary>
WithStatement = 0x3f,
// Newly added
OmittedArgumentExpression = 0x300,
/// <summary>Indicates an <see cref="ILateBoundMemberReferenceExpression"/>.</summary>
LateBoundMemberReferenceExpression = 0x301,
/// <summary>Indicates an <see cref="IPlaceholderExpression"/>.</summary>
PlaceholderExpression = 0x302,
/// <summary>Indicates an <see cref="IConditionalAccessExpression"/>.</summary>
ConditionalAccessExpression = 0x40,
/// <summary>Indicates an <see cref="IIncrementExpression"/>.</summary>
IncrementExpression = 0x41,
// Operations that are constituents of statements, expressions, or declarations.
/// <summary>Indicates an <see cref="IArgument"/>.</summary>
Argument = 0x42,
/// <summary>Indicates an <see cref="IFieldInitializer"/>.</summary>
FieldInitializerInCreation = 0x43,
FieldInitializerInCreation = 0x400,
/// <summary>Indicates an <see cref="IFieldInitializer"/>.</summary>
FieldInitializerAtDeclaration = 0x401,
/// <summary>Indicates an <see cref="IPropertyInitializer"/>.</summary>
PropertyInitializerInCreation = 0x44,
PropertyInitializerInCreation = 0x402,
/// <summary>Indicates an <see cref="IPropertyInitializer"/>.</summary>
PropertyInitializerAtDeclaration = 0x403,
/// <summary>Indicates an <see cref="IParameterInitializer"/>.</summary>
ParameterInitializerAtDeclaration = 0x404,
/// <summary>Indicates an <see cref="IArrayInitializer"/>.</summary>
ArrayInitializer = 0x45,
ArrayInitializer = 0x405,
/// <summary>Indicates an <see cref="IVariableDeclaration"/>.</summary>
VariableDeclaration = 0x46,
VariableDeclaration = 0x406,
/// <summary>Indicates an <see cref="IArgument"/>.</summary>
Argument = 0x407,
/// <summary>Indicates an <see cref="ICatchClause"/>.</summary>
CatchClause = 0x408,
/// <summary>Indicates an <see cref="ISwitchCase"/>.</summary>
SwitchCase = 0x47,
SwitchCase = 0x409,
/// <summary>Indicates an <see cref="ISingleValueCaseClause"/>.</summary>
SingleValueCaseClause = 0x48,
SingleValueCaseClause = 0x40a,
/// <summary>Indicates an <see cref="IRelationalCaseClause"/>.</summary>
RelationalCaseClause = 0x49,
RelationalCaseClause = 0x40b,
/// <summary>Indicates an <see cref="IRangeCaseClause"/>.</summary>
RangeCaseClause = 0x4a,
/// <summary>Indicates an <see cref="IParameterInitializer"/>.</summary>
ParameterInitializerAtDeclaration = 0x4b,
/// <summary>Indicates an <see cref="IFieldInitializer"/>.</summary>
FieldInitializerAtDeclaration = 0x4c,
/// <summary>Indicates an <see cref="IPropertyInitializer"/>.</summary>
PropertyInitializerAtDeclaration = 0x4d
RangeCaseClause = 0x40c,
}
}
......@@ -397,30 +397,18 @@ public interface IUsingStatement : IOperation
/// Body of the using, over which the resources of the using are maintained.
/// </summary>
IOperation Body { get; }
}
/// <summary>
/// Represents a C# using or VB Using statement that declares one or more local variables for the resources held by the using.
/// </summary>
public interface IUsingWithDeclarationStatement : IUsingStatement
{
/// <summary>
/// Declaration of variables introduced by the using.
/// Declaration introduced by the using statement. Null if the using statement does not declare any variables.
/// </summary>
IVariableDeclarationStatement Declaration { get; }
}
/// <summary>
/// Represents a C# using or VB Using statement that uses an expression for the resource held by the using.
/// </summary>
public interface IUsingWithExpressionStatement : IUsingStatement
{
/// <summary>
/// Resource held by the using.
/// Resource held by the using. Can be null if Declaration is not null.
/// </summary>
IOperation Value { get; }
}
/// <summary>
/// Represents a C# fixed staement.
/// </summary>
......
......@@ -130,12 +130,7 @@ public virtual void VisitCatch(ICatchClause operation)
DefaultVisit(operation);
}
public virtual void VisitUsingWithDeclarationStatement(IUsingWithDeclarationStatement operation)
{
DefaultVisit(operation);
}
public virtual void VisitUsingWithExpressionStatement(IUsingWithExpressionStatement operation)
public virtual void VisitUsingStatement(IUsingStatement operation)
{
DefaultVisit(operation);
}
......@@ -240,6 +235,21 @@ public virtual void VisitConditionalAccessExpression(IConditionalAccessExpressio
DefaultVisit(operation);
}
public virtual void VisitConditionalAccessInstanceExpression(IConditionalAccessInstanceExpression operation)
{
DefaultVisit(operation);
}
public virtual void VisitPlaceholderExpression(IPlaceholderExpression operation)
{
DefaultVisit(operation);
}
public virtual void VisitIndexedPropertyReferenceExpression(IIndexedPropertyReferenceExpression operation)
{
DefaultVisit(operation);
}
public virtual void VisitUnaryOperatorExpression(IUnaryOperatorExpression operation)
{
DefaultVisit(operation);
......@@ -265,7 +275,7 @@ public virtual void VisitNullCoalescingExpression(INullCoalescingExpression oper
DefaultVisit(operation);
}
public virtual void VisitIsExpression(IIsExpression operation)
public virtual void VisitIsTypeExpression(IIsTypeExpression operation)
{
DefaultVisit(operation);
}
......@@ -515,16 +525,11 @@ public virtual TResult VisitCatch(ICatchClause operation, TArgument argument)
return DefaultVisit(operation, argument);
}
public virtual TResult VisitUsingWithDeclarationStatement(IUsingWithDeclarationStatement operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
public virtual TResult VisitUsingWithExpressionStatement(IUsingWithExpressionStatement operation, TArgument argument)
public virtual TResult VisitUsingStatement(IUsingStatement operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
public virtual TResult VisitFixedStatement(IFixedStatement operation, TArgument argument)
{
return DefaultVisit(operation, argument);
......@@ -625,6 +630,21 @@ public virtual TResult VisitConditionalAccessExpression(IConditionalAccessExpres
return DefaultVisit(operation, argument);
}
public virtual TResult VisitConditionalAccessInstanceExpression(IConditionalAccessInstanceExpression operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
public virtual TResult VisitPlaceholderExpression(IPlaceholderExpression operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
public virtual TResult VisitIndexedPropertyReferenceExpression(IIndexedPropertyReferenceExpression operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
public virtual TResult VisitUnaryOperatorExpression(IUnaryOperatorExpression operation, TArgument argument)
{
return DefaultVisit(operation, argument);
......@@ -650,7 +670,7 @@ public virtual TResult VisitNullCoalescingExpression(INullCoalescingExpression o
return DefaultVisit(operation, argument);
}
public virtual TResult VisitIsExpression(IIsExpression operation, TArgument argument)
public virtual TResult VisitIsTypeExpression(IIsTypeExpression operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
......
......@@ -161,13 +161,9 @@ public override void VisitCatch(ICatchClause operation)
Visit(operation.Handler);
}
public override void VisitUsingWithDeclarationStatement(IUsingWithDeclarationStatement operation)
public override void VisitUsingStatement(IUsingStatement operation)
{
Visit(operation.Declaration);
}
public override void VisitUsingWithExpressionStatement(IUsingWithExpressionStatement operation)
{
Visit(operation.Value);
}
......@@ -261,7 +257,22 @@ public override void VisitEventAssignmentExpression(IEventAssignmentExpression o
public override void VisitConditionalAccessExpression(IConditionalAccessExpression operation)
{
Visit(operation.Access);
Visit(operation.ConditionalValue);
Visit(operation.ConditionalInstance);
}
public override void VisitConditionalAccessInstanceExpression(IConditionalAccessInstanceExpression operation)
{
}
public override void VisitPlaceholderExpression(IPlaceholderExpression operation)
{
}
public override void VisitIndexedPropertyReferenceExpression(IIndexedPropertyReferenceExpression operation)
{
Visit(operation.Instance);
VisitArray(operation.ArgumentsInParameterOrder);
}
public override void VisitUnaryOperatorExpression(IUnaryOperatorExpression operation)
......@@ -271,8 +282,8 @@ public override void VisitUnaryOperatorExpression(IUnaryOperatorExpression opera
public override void VisitBinaryOperatorExpression(IBinaryOperatorExpression operation)
{
Visit(operation.Left);
Visit(operation.Right);
Visit(operation.LeftOperand);
Visit(operation.RightOperand);
}
public override void VisitConversionExpression(IConversionExpression operation)
......@@ -289,11 +300,11 @@ public override void VisitConditionalChoiceExpression(IConditionalChoiceExpressi
public override void VisitNullCoalescingExpression(INullCoalescingExpression operation)
{
Visit(operation.Primary);
Visit(operation.Secondary);
Visit(operation.PrimaryOperand);
Visit(operation.SecondaryOperand);
}
public override void VisitIsExpression(IIsExpression operation)
public override void VisitIsTypeExpression(IIsTypeExpression operation)
{
Visit(operation.Operand);
}
......
......@@ -174,53 +174,23 @@ string Cci.INamedEntity.Name
/// <summary>
/// A fake containing assembly for an ErrorType object.
/// </summary>
private class ErrorAssembly : Cci.IAssemblyReference
private sealed class ErrorAssembly : Cci.IAssemblyReference
{
public static readonly ErrorAssembly Singleton = new ErrorAssembly();
/// <summary>
/// For the name we will use a word "Error" followed by a guid, generated on the spot.
/// </summary>
private static readonly string s_name = "Error" + Guid.NewGuid().ToString("B");
private static readonly AssemblyIdentity s_identity = new AssemblyIdentity(
name: "Error" + Guid.NewGuid().ToString("B"),
version: AssemblyIdentity.NullVersion,
cultureName: "",
publicKeyOrToken: ImmutableArray<byte>.Empty,
hasPublicKey: false,
isRetargetable: false,
contentType: AssemblyContentType.Default);
string Cci.IAssemblyReference.Culture
{
get
{
return "";
}
}
bool Cci.IAssemblyReference.IsRetargetable
{
get
{
return false;
}
}
AssemblyContentType Cci.IAssemblyReference.ContentType
{
get
{
return AssemblyContentType.Default;
}
}
ImmutableArray<byte> Cci.IAssemblyReference.PublicKeyToken
{
get
{
return ImmutableArray<byte>.Empty;
}
}
Version Cci.IAssemblyReference.Version
{
get
{
return AssemblyIdentity.NullVersion;
}
}
AssemblyIdentity Cci.IAssemblyReference.Identity => s_identity;
Cci.IAssemblyReference Cci.IModuleReference.GetContainingAssembly(EmitContext context)
{
......@@ -242,18 +212,7 @@ Cci.IDefinition Cci.IReference.AsDefinition(EmitContext context)
return null;
}
public string GetDisplayName()
{
return s_name;
}
string Cci.INamedEntity.Name
{
get
{
return s_name;
}
}
string Cci.INamedEntity.Name => s_identity.Name;
}
}
}
......@@ -469,7 +469,7 @@ private void DefineAssemblyReferenceAliases()
{
foreach (AssemblyReferenceAlias alias in Module.GetAssemblyReferenceAliases(Context))
{
UsingNamespace("Z" + alias.Name + " " + alias.Assembly.GetDisplayName(), Module);
UsingNamespace("Z" + alias.Name + " " + alias.Assembly.Identity.GetDisplayName(), Module);
}
}
......
......@@ -2568,16 +2568,18 @@ private void PopulateAssemblyRefTableRows()
foreach (var assemblyRef in assemblyRefs)
{
AssemblyRefTableRow r = new AssemblyRefTableRow();
r.Version = assemblyRef.Version;
r.PublicKeyToken = heaps.GetBlobIndex(assemblyRef.PublicKeyToken);
var identity = assemblyRef.Identity;
r.Version = identity.Version;
r.PublicKeyToken = heaps.GetBlobIndex(identity.PublicKeyToken);
Debug.Assert(!string.IsNullOrEmpty(assemblyRef.Name));
r.Name = this.GetStringIndexForPathAndCheckLength(assemblyRef.Name, assemblyRef);
r.Culture = heaps.GetStringIndex(assemblyRef.Culture);
r.Culture = heaps.GetStringIndex(identity.CultureName);
r.IsRetargetable = assemblyRef.IsRetargetable;
r.ContentType = assemblyRef.ContentType;
r.IsRetargetable = identity.IsRetargetable;
r.ContentType = identity.ContentType;
_assemblyRefTable.Add(r);
}
}
......@@ -2594,24 +2596,12 @@ protected sealed class AssemblyReferenceComparer : IEqualityComparer<IAssemblyRe
public bool Equals(IAssemblyReference x, IAssemblyReference y)
{
if (ReferenceEquals(x, y))
{
return true;
}
return
x.Version.Equals(y.Version) &&
ByteSequenceComparer.Equals(x.PublicKeyToken, y.PublicKeyToken) &&
x.Name == y.Name &&
x.Culture == y.Culture;
return x.Identity == y.Identity;
}
public int GetHashCode(IAssemblyReference reference)
{
return Hash.Combine(reference.Version,
Hash.Combine(ByteSequenceComparer.GetHashCode(reference.PublicKeyToken),
Hash.Combine(reference.Name.GetHashCode(),
Hash.Combine(reference.Culture, 0))));
return reference.Identity.GetHashCode();
}
}
......@@ -2627,7 +2617,7 @@ private void PopulateAssemblyTableRows()
IAssembly assembly = this.module.AsAssembly;
_assemblyKey = heaps.GetBlobIndex(assembly.PublicKey);
_assemblyName = this.GetStringIndexForPathAndCheckLength(assembly.Name, assembly);
_assemblyCulture = heaps.GetStringIndex(assembly.Culture);
_assemblyCulture = heaps.GetStringIndex(assembly.Identity.CultureName);
}
private BlobIdx _assemblyKey;
......@@ -4118,11 +4108,13 @@ private void SerializeAssemblyTable(BlobBuilder writer, MetadataSizes metadataSi
}
IAssembly assembly = this.module.AsAssembly;
var identity = assembly.Identity;
writer.WriteUInt32((uint)assembly.HashAlgorithm);
writer.WriteUInt16((ushort)assembly.Version.Major);
writer.WriteUInt16((ushort)assembly.Version.Minor);
writer.WriteUInt16((ushort)assembly.Version.Build);
writer.WriteUInt16((ushort)assembly.Version.Revision);
writer.WriteUInt16((ushort)identity.Version.Major);
writer.WriteUInt16((ushort)identity.Version.Minor);
writer.WriteUInt16((ushort)identity.Version.Build);
writer.WriteUInt16((ushort)identity.Version.Revision);
writer.WriteUInt32(assembly.Flags);
writer.WriteReference((uint)heaps.ResolveBlobIndex(_assemblyKey), metadataSizes.BlobIndexSize);
......@@ -4948,13 +4940,15 @@ private void SerializeTypeName(ITypeReference typeReference, BlobBuilder writer)
/// </summary>
internal static string StrongName(IAssemblyReference assemblyReference)
{
var identity = assemblyReference.Identity;
var pooled = PooledStringBuilder.GetInstance();
StringBuilder sb = pooled.Builder;
sb.Append(assemblyReference.Name);
sb.AppendFormat(CultureInfo.InvariantCulture, ", Version={0}.{1}.{2}.{3}", assemblyReference.Version.Major, assemblyReference.Version.Minor, assemblyReference.Version.Build, assemblyReference.Version.Revision);
if (!string.IsNullOrEmpty(assemblyReference.Culture))
sb.Append(identity.Name);
sb.AppendFormat(CultureInfo.InvariantCulture, ", Version={0}.{1}.{2}.{3}", identity.Version.Major, identity.Version.Minor, identity.Version.Build, identity.Version.Revision);
if (!string.IsNullOrEmpty(identity.CultureName))
{
sb.AppendFormat(CultureInfo.InvariantCulture, ", Culture={0}", assemblyReference.Culture);
sb.AppendFormat(CultureInfo.InvariantCulture, ", Culture={0}", identity.CultureName);
}
else
{
......@@ -4962,9 +4956,9 @@ internal static string StrongName(IAssemblyReference assemblyReference)
}
sb.Append(", PublicKeyToken=");
if (assemblyReference.PublicKeyToken.Length > 0)
if (identity.PublicKeyToken.Length > 0)
{
foreach (byte b in assemblyReference.PublicKeyToken)
foreach (byte b in identity.PublicKeyToken)
{
sb.Append(b.ToString("x2"));
}
......@@ -4974,18 +4968,18 @@ internal static string StrongName(IAssemblyReference assemblyReference)
sb.Append("null");
}
if (assemblyReference.IsRetargetable)
if (identity.IsRetargetable)
{
sb.Append(", Retargetable=Yes");
}
if (assemblyReference.ContentType == AssemblyContentType.WindowsRuntime)
if (identity.ContentType == AssemblyContentType.WindowsRuntime)
{
sb.Append(", ContentType=WindowsRuntime");
}
else
{
Debug.Assert(assemblyReference.ContentType == AssemblyContentType.Default);
Debug.Assert(identity.ContentType == AssemblyContentType.Default);
}
return pooled.ToStringAndFree();
......
......@@ -51,34 +51,7 @@ internal interface IAssembly : IModule, IAssemblyReference
/// </summary>
internal interface IAssemblyReference : IModuleReference
{
/// <summary>
/// Identifies the culture associated with the assembly reference. Typically specified for satellite assemblies with localized resources.
/// Empty if not specified.
/// </summary>
string Culture { get; }
/// <summary>
/// True if the implementation of the referenced assembly used at runtime is not expected to match the version seen at compile time.
/// </summary>
bool IsRetargetable { get; }
/// <summary>
/// Type of code contained in an assembly. Determines assembly binding model.
/// </summary>
AssemblyContentType ContentType { get; }
/// <summary>
/// The hashed 8 bytes of the public key of the referenced assembly.
/// Empty if the referenced assembly does not have a public key.
/// </summary>
ImmutableArray<byte> PublicKeyToken { get; }
/// <summary>
/// The version of the assembly reference.
/// </summary>
Version Version { get; }
string GetDisplayName();
AssemblyIdentity Identity { get; }
}
/// <summary>
......
......@@ -68,79 +68,81 @@ Microsoft.CodeAnalysis.ISkippedTokensTriviaSyntax.Tokens.get -> Microsoft.CodeAn
Microsoft.CodeAnalysis.Metadata.Id.get -> Microsoft.CodeAnalysis.MetadataId
Microsoft.CodeAnalysis.MetadataId
Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AddressOfExpression = 54 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.Argument = 66 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayCreationExpression = 46 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayElementReferenceExpression = 29 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayInitializer = 69 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AssignmentExpression = 55 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AwaitExpression = 53 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.BinaryOperatorExpression = 40 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AddressOfExpression = 515 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.Argument = 1031 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayCreationExpression = 276 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayElementReferenceExpression = 260 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayInitializer = 1029 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AssignmentExpression = 280 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AwaitExpression = 279 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.BinaryOperatorExpression = 270 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.BlockStatement = 2 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.BranchStatement = 12 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.CatchClause = 18 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.CompoundAssignmentExpression = 56 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConditionalAccessExpression = 64 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConditionalChoiceExpression = 41 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConversionExpression = 27 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.DefaultValueExpression = 47 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EmptyStatement = 13 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EndStatement = 62 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EventAssignmentExpression = 59 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EventReferenceExpression = 37 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ExpressionStatement = 24 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FieldInitializerAtDeclaration = 76 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FieldInitializerInCreation = 67 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FieldReferenceExpression = 34 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FixedStatement = 22 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.BranchStatement = 8 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.CatchClause = 1032 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.CompoundAssignmentExpression = 281 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConditionalAccessExpression = 284 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConditionalAccessInstanceExpression = 285 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConditionalChoiceExpression = 271 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ConversionExpression = 258 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.DefaultValueExpression = 512 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EmptyStatement = 9 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EndStatement = 81 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EventAssignmentExpression = 283 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EventReferenceExpression = 268 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ExpressionStatement = 17 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FieldInitializerAtDeclaration = 1025 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FieldInitializerInCreation = 1024 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FieldReferenceExpression = 264 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.FixedStatement = 48 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IfStatement = 5 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IncrementExpression = 65 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InstanceReferenceExpression = 48 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InvalidExpression = 25 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IncrementExpression = 518 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IndexedPropertyReferenceExpression = 267 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InstanceReferenceExpression = 277 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InvalidExpression = 256 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InvalidStatement = 1 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InvocationExpression = 28 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IsExpression = 51 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LabelStatement = 10 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LambdaExpression = 43 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LateBoundMemberReferenceExpression = 38 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LiteralExpression = 26 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LocalReferenceExpression = 31 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LockStatement = 16 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.InvocationExpression = 259 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IsTypeExpression = 278 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LabelStatement = 7 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LambdaExpression = 273 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LateBoundMemberReferenceExpression = 769 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LiteralExpression = 257 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LocalReferenceExpression = 261 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LockStatement = 13 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LoopStatement = 6 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.MethodBindingExpression = 35 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.MethodBindingExpression = 265 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.None = 0 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.NullCoalescingExpression = 42 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ObjectCreationExpression = 44 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.OmittedArgumentExpression = 60 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ParameterInitializerAtDeclaration = 75 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ParameterReferenceExpression = 32 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ParenthesizedExpression = 57 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PointerIndirectionReferenceExpression = 30 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PropertyInitializerAtDeclaration = 77 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PropertyInitializerInCreation = 68 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PropertyReferenceExpression = 36 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.RangeCaseClause = 74 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.RelationalCaseClause = 73 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ReturnStatement = 15 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SingleValueCaseClause = 72 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SizeOfExpression = 80 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.StopStatement = 61 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SwitchCase = 71 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.NullCoalescingExpression = 272 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ObjectCreationExpression = 274 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.OmittedArgumentExpression = 768 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ParameterInitializerAtDeclaration = 1028 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ParameterReferenceExpression = 262 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ParenthesizedExpression = 282 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PlaceholderExpression = 770 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PointerIndirectionReferenceExpression = 516 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PropertyInitializerAtDeclaration = 1027 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PropertyInitializerInCreation = 1026 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.PropertyReferenceExpression = 266 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.RangeCaseClause = 1036 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.RelationalCaseClause = 1035 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ReturnStatement = 11 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SingleValueCaseClause = 1034 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SizeOfExpression = 514 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.StopStatement = 80 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SwitchCase = 1033 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SwitchStatement = 4 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SyntheticLocalReferenceExpression = 33 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ThrowStatement = 14 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.TryStatement = 17 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.TypeOfExpression = 52 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.TypeParameterObjectCreationExpression = 45 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UnaryOperatorExpression = 39 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UnboundLambdaExpression = 58 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UsingWithDeclarationStatement = 19 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UsingWithExpressionStatement = 20 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.VariableDeclaration = 70 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.SyntheticLocalReferenceExpression = 263 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ThrowStatement = 10 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.TryStatement = 14 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.TypeOfExpression = 513 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.TypeParameterObjectCreationExpression = 275 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UnaryOperatorExpression = 269 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UnboundLambdaExpression = 517 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.UsingStatement = 15 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.VariableDeclaration = 1030 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.VariableDeclarationStatement = 3 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.WithStatement = 63 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.YieldBreakStatement = 9 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.YieldReturnStatement = 21 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.WithStatement = 82 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.YieldBreakStatement = 12 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.YieldReturnStatement = 16 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.SemanticModel.GetOperation(Microsoft.CodeAnalysis.SyntaxNode node, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.ArgumentKind
Microsoft.CodeAnalysis.Semantics.ArgumentKind.DefaultValue = 4 -> Microsoft.CodeAnalysis.Semantics.ArgumentKind
......@@ -157,6 +159,7 @@ Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.Enum = 1792 -> Microsoft.Cod
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.Floating = 1024 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.Integer = 512 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.IntegerPointer = 3072 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.Invalid = 65280 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.None = 0 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.Nullable = 3840 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind.Object = 2304 -> Microsoft.CodeAnalysis.Semantics.BinaryOperandsKind
......@@ -241,6 +244,7 @@ Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.IntegerPointerAdd = 3073 ->
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.IntegerRemainder = 518 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.IntegerRightShift = 521 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.IntegerSubtract = 514 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.Invalid = 65535 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.None = 0 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.NullableEquals = 3856 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.BinaryOperationKind.NullableNotEquals = 3858 -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
......@@ -355,8 +359,8 @@ Microsoft.CodeAnalysis.Semantics.IAwaitExpression
Microsoft.CodeAnalysis.Semantics.IAwaitExpression.AwaitedValue.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression
Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression.BinaryOperationKind.get -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression.Left.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression.Right.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression.LeftOperand.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression.RightOperand.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IBlockStatement
Microsoft.CodeAnalysis.Semantics.IBlockStatement.Locals.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ILocalSymbol>
Microsoft.CodeAnalysis.Semantics.IBlockStatement.Statements.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IOperation>
......@@ -373,7 +377,9 @@ Microsoft.CodeAnalysis.Semantics.ICatchClause.Handler.get -> Microsoft.CodeAnaly
Microsoft.CodeAnalysis.Semantics.ICompoundAssignmentExpression
Microsoft.CodeAnalysis.Semantics.ICompoundAssignmentExpression.BinaryOperationKind.get -> Microsoft.CodeAnalysis.Semantics.BinaryOperationKind
Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression
Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression.Access.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression.ConditionalInstance.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression.ConditionalValue.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IConditionalAccessInstanceExpression
Microsoft.CodeAnalysis.Semantics.IConditionalChoiceExpression
Microsoft.CodeAnalysis.Semantics.IConditionalChoiceExpression.Condition.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IConditionalChoiceExpression.IfFalseValue.get -> Microsoft.CodeAnalysis.IOperation
......@@ -422,6 +428,7 @@ Microsoft.CodeAnalysis.Semantics.IIfStatement.IfFalseStatement.get -> Microsoft.
Microsoft.CodeAnalysis.Semantics.IIfStatement.IfTrueStatement.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IIncrementExpression
Microsoft.CodeAnalysis.Semantics.IIncrementExpression.IncrementOperationKind.get -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.IIndexedPropertyReferenceExpression
Microsoft.CodeAnalysis.Semantics.IInstanceReferenceExpression
Microsoft.CodeAnalysis.Semantics.IInstanceReferenceExpression.InstanceReferenceKind.get -> Microsoft.CodeAnalysis.Semantics.InstanceReferenceKind
Microsoft.CodeAnalysis.Semantics.IInvalidExpression
......@@ -431,9 +438,9 @@ Microsoft.CodeAnalysis.Semantics.IInvocationExpression.ArgumentsInSourceOrder.ge
Microsoft.CodeAnalysis.Semantics.IInvocationExpression.Instance.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IInvocationExpression.IsVirtual.get -> bool
Microsoft.CodeAnalysis.Semantics.IInvocationExpression.TargetMethod.get -> Microsoft.CodeAnalysis.IMethodSymbol
Microsoft.CodeAnalysis.Semantics.IIsExpression
Microsoft.CodeAnalysis.Semantics.IIsExpression.IsType.get -> Microsoft.CodeAnalysis.ITypeSymbol
Microsoft.CodeAnalysis.Semantics.IIsExpression.Operand.get -> Microsoft.CodeAnalysis.IOperation
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
......@@ -460,8 +467,8 @@ Microsoft.CodeAnalysis.Semantics.IMethodBindingExpression
Microsoft.CodeAnalysis.Semantics.IMethodBindingExpression.IsVirtual.get -> bool
Microsoft.CodeAnalysis.Semantics.IMethodBindingExpression.Method.get -> Microsoft.CodeAnalysis.IMethodSymbol
Microsoft.CodeAnalysis.Semantics.INullCoalescingExpression
Microsoft.CodeAnalysis.Semantics.INullCoalescingExpression.Primary.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.INullCoalescingExpression.Secondary.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.INullCoalescingExpression.PrimaryOperand.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.INullCoalescingExpression.SecondaryOperand.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IObjectCreationExpression
Microsoft.CodeAnalysis.Semantics.IObjectCreationExpression.Constructor.get -> Microsoft.CodeAnalysis.IMethodSymbol
Microsoft.CodeAnalysis.Semantics.IObjectCreationExpression.MemberInitializers.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Semantics.ISymbolInitializer>
......@@ -472,6 +479,7 @@ Microsoft.CodeAnalysis.Semantics.IParameterReferenceExpression
Microsoft.CodeAnalysis.Semantics.IParameterReferenceExpression.Parameter.get -> Microsoft.CodeAnalysis.IParameterSymbol
Microsoft.CodeAnalysis.Semantics.IParenthesizedExpression
Microsoft.CodeAnalysis.Semantics.IParenthesizedExpression.Operand.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IPlaceholderExpression
Microsoft.CodeAnalysis.Semantics.IPointerIndirectionReferenceExpression
Microsoft.CodeAnalysis.Semantics.IPointerIndirectionReferenceExpression.Pointer.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IPropertyInitializer
......@@ -519,10 +527,8 @@ Microsoft.CodeAnalysis.Semantics.IUnaryOperatorExpression.UnaryOperationKind.get
Microsoft.CodeAnalysis.Semantics.IUnboundLambdaExpression
Microsoft.CodeAnalysis.Semantics.IUsingStatement
Microsoft.CodeAnalysis.Semantics.IUsingStatement.Body.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IUsingWithDeclarationStatement
Microsoft.CodeAnalysis.Semantics.IUsingWithDeclarationStatement.Declaration.get -> Microsoft.CodeAnalysis.Semantics.IVariableDeclarationStatement
Microsoft.CodeAnalysis.Semantics.IUsingWithExpressionStatement
Microsoft.CodeAnalysis.Semantics.IUsingWithExpressionStatement.Value.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IUsingStatement.Declaration.get -> Microsoft.CodeAnalysis.Semantics.IVariableDeclarationStatement
Microsoft.CodeAnalysis.Semantics.IUsingStatement.Value.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IVariableDeclaration
Microsoft.CodeAnalysis.Semantics.IVariableDeclaration.InitialValue.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IVariableDeclaration.Variable.get -> Microsoft.CodeAnalysis.ILocalSymbol
......@@ -561,6 +567,7 @@ Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.ExclusiveOr = 12 -> M
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.GreaterThan = 23 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.GreaterThanOrEqual = 22 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.IntegerDivide = 5 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.Invalid = 255 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.LeftShift = 8 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.LessThan = 20 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind.LessThanOrEqual = 21 -> Microsoft.CodeAnalysis.Semantics.SimpleBinaryOperationKind
......@@ -579,6 +586,7 @@ Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.BitwiseNegation = 1 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.BitwiseOrLogicalNot = 11 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.False = 10 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.Invalid = 255 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.LogicalNot = 2 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.Minus = 8 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind.None = 0 -> Microsoft.CodeAnalysis.Semantics.SimpleUnaryOperationKind
......@@ -600,6 +608,7 @@ Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.Dynamic = 2048 -> Microsoft.Co
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.Enum = 1792 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.Floating = 1024 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.Integer = 512 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.Invalid = 65280 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.None = 0 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.Object = 2304 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
Microsoft.CodeAnalysis.Semantics.UnaryOperandKind.OperatorMethod = 256 -> Microsoft.CodeAnalysis.Semantics.UnaryOperandKind
......@@ -641,6 +650,7 @@ Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.IntegerPostfixDecrement = 51
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.IntegerPostfixIncrement = 515 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.IntegerPrefixDecrement = 518 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.IntegerPrefixIncrement = 517 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.Invalid = 65535 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.None = 0 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.ObjectMinus = 2312 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
Microsoft.CodeAnalysis.Semantics.UnaryOperationKind.ObjectNot = 2315 -> Microsoft.CodeAnalysis.Semantics.UnaryOperationKind
......@@ -683,6 +693,7 @@ override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitBranchStatement(M
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitCatch(Microsoft.CodeAnalysis.Semantics.ICatchClause operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitCompoundAssignmentExpression(Microsoft.CodeAnalysis.Semantics.ICompoundAssignmentExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitConditionalAccessExpression(Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitConditionalAccessInstanceExpression(Microsoft.CodeAnalysis.Semantics.IConditionalAccessInstanceExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitConditionalChoiceExpression(Microsoft.CodeAnalysis.Semantics.IConditionalChoiceExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitConversionExpression(Microsoft.CodeAnalysis.Semantics.IConversionExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitDefaultValueExpression(Microsoft.CodeAnalysis.Semantics.IDefaultValueExpression operation) -> void
......@@ -698,11 +709,12 @@ override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitForEachLoopStatem
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitForLoopStatement(Microsoft.CodeAnalysis.Semantics.IForLoopStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitIfStatement(Microsoft.CodeAnalysis.Semantics.IIfStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitIncrementExpression(Microsoft.CodeAnalysis.Semantics.IIncrementExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitIndexedPropertyReferenceExpression(Microsoft.CodeAnalysis.Semantics.IIndexedPropertyReferenceExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitInstanceReferenceExpression(Microsoft.CodeAnalysis.Semantics.IInstanceReferenceExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitInvalidExpression(Microsoft.CodeAnalysis.Semantics.IInvalidExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitInvalidStatement(Microsoft.CodeAnalysis.Semantics.IInvalidStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitIsExpression(Microsoft.CodeAnalysis.Semantics.IIsExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitIsTypeExpression(Microsoft.CodeAnalysis.Semantics.IIsTypeExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitLabelStatement(Microsoft.CodeAnalysis.Semantics.ILabelStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitLateBoundMemberReferenceExpression(Microsoft.CodeAnalysis.Semantics.ILateBoundMemberReferenceExpression operation) -> void
......@@ -716,6 +728,7 @@ override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitOmittedArgumentEx
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitParameterInitializer(Microsoft.CodeAnalysis.Semantics.IParameterInitializer operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitParameterReferenceExpression(Microsoft.CodeAnalysis.Semantics.IParameterReferenceExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitParenthesizedExpression(Microsoft.CodeAnalysis.Semantics.IParenthesizedExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitPlaceholderExpression(Microsoft.CodeAnalysis.Semantics.IPlaceholderExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitPointerIndirectionReferenceExpression(Microsoft.CodeAnalysis.Semantics.IPointerIndirectionReferenceExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitPropertyInitializer(Microsoft.CodeAnalysis.Semantics.IPropertyInitializer operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitPropertyReferenceExpression(Microsoft.CodeAnalysis.Semantics.IPropertyReferenceExpression operation) -> void
......@@ -734,8 +747,7 @@ override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitTypeOfExpression(
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitTypeParameterObjectCreationExpression(Microsoft.CodeAnalysis.Semantics.ITypeParameterObjectCreationExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitUnaryOperatorExpression(Microsoft.CodeAnalysis.Semantics.IUnaryOperatorExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitUnboundLambdaExpression(Microsoft.CodeAnalysis.Semantics.IUnboundLambdaExpression operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitUsingWithDeclarationStatement(Microsoft.CodeAnalysis.Semantics.IUsingWithDeclarationStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitUsingWithExpressionStatement(Microsoft.CodeAnalysis.Semantics.IUsingWithExpressionStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitUsingStatement(Microsoft.CodeAnalysis.Semantics.IUsingStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitVariableDeclaration(Microsoft.CodeAnalysis.Semantics.IVariableDeclaration operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitVariableDeclarationStatement(Microsoft.CodeAnalysis.Semantics.IVariableDeclarationStatement operation) -> void
override Microsoft.CodeAnalysis.Semantics.OperationWalker.VisitWhileUntilLoopStatement(Microsoft.CodeAnalysis.Semantics.IWhileUntilLoopStatement operation) -> void
......@@ -779,6 +791,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitBranchStatement(M
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitCatch(Microsoft.CodeAnalysis.Semantics.ICatchClause operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitCompoundAssignmentExpression(Microsoft.CodeAnalysis.Semantics.ICompoundAssignmentExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitConditionalAccessExpression(Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitConditionalAccessInstanceExpression(Microsoft.CodeAnalysis.Semantics.IConditionalAccessInstanceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitConditionalChoiceExpression(Microsoft.CodeAnalysis.Semantics.IConditionalChoiceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitConversionExpression(Microsoft.CodeAnalysis.Semantics.IConversionExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitDefaultValueExpression(Microsoft.CodeAnalysis.Semantics.IDefaultValueExpression operation) -> void
......@@ -794,11 +807,12 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitForEachLoopStatem
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitForLoopStatement(Microsoft.CodeAnalysis.Semantics.IForLoopStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIfStatement(Microsoft.CodeAnalysis.Semantics.IIfStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIncrementExpression(Microsoft.CodeAnalysis.Semantics.IIncrementExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIndexedPropertyReferenceExpression(Microsoft.CodeAnalysis.Semantics.IIndexedPropertyReferenceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInstanceReferenceExpression(Microsoft.CodeAnalysis.Semantics.IInstanceReferenceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvalidExpression(Microsoft.CodeAnalysis.Semantics.IInvalidExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvalidStatement(Microsoft.CodeAnalysis.Semantics.IInvalidStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsExpression(Microsoft.CodeAnalysis.Semantics.IIsExpression 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.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLateBoundMemberReferenceExpression(Microsoft.CodeAnalysis.Semantics.ILateBoundMemberReferenceExpression operation) -> void
......@@ -812,6 +826,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitOmittedArgumentEx
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitParameterInitializer(Microsoft.CodeAnalysis.Semantics.IParameterInitializer operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitParameterReferenceExpression(Microsoft.CodeAnalysis.Semantics.IParameterReferenceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitParenthesizedExpression(Microsoft.CodeAnalysis.Semantics.IParenthesizedExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitPlaceholderExpression(Microsoft.CodeAnalysis.Semantics.IPlaceholderExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitPointerIndirectionReferenceExpression(Microsoft.CodeAnalysis.Semantics.IPointerIndirectionReferenceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitPropertyInitializer(Microsoft.CodeAnalysis.Semantics.IPropertyInitializer operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitPropertyReferenceExpression(Microsoft.CodeAnalysis.Semantics.IPropertyReferenceExpression operation) -> void
......@@ -830,8 +845,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitTypeOfExpression(
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitTypeParameterObjectCreationExpression(Microsoft.CodeAnalysis.Semantics.ITypeParameterObjectCreationExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitUnaryOperatorExpression(Microsoft.CodeAnalysis.Semantics.IUnaryOperatorExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitUnboundLambdaExpression(Microsoft.CodeAnalysis.Semantics.IUnboundLambdaExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitUsingWithDeclarationStatement(Microsoft.CodeAnalysis.Semantics.IUsingWithDeclarationStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitUsingWithExpressionStatement(Microsoft.CodeAnalysis.Semantics.IUsingWithExpressionStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitUsingStatement(Microsoft.CodeAnalysis.Semantics.IUsingStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitVariableDeclaration(Microsoft.CodeAnalysis.Semantics.IVariableDeclaration operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitVariableDeclarationStatement(Microsoft.CodeAnalysis.Semantics.IVariableDeclarationStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitWhileUntilLoopStatement(Microsoft.CodeAnalysis.Semantics.IWhileUntilLoopStatement operation) -> void
......@@ -852,6 +866,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.Vi
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitCatch(Microsoft.CodeAnalysis.Semantics.ICatchClause operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitCompoundAssignmentExpression(Microsoft.CodeAnalysis.Semantics.ICompoundAssignmentExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitConditionalAccessExpression(Microsoft.CodeAnalysis.Semantics.IConditionalAccessExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitConditionalAccessInstanceExpression(Microsoft.CodeAnalysis.Semantics.IConditionalAccessInstanceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitConditionalChoiceExpression(Microsoft.CodeAnalysis.Semantics.IConditionalChoiceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitConversionExpression(Microsoft.CodeAnalysis.Semantics.IConversionExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitDefaultValueExpression(Microsoft.CodeAnalysis.Semantics.IDefaultValueExpression operation, TArgument argument) -> TResult
......@@ -867,11 +882,12 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.Vi
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitForLoopStatement(Microsoft.CodeAnalysis.Semantics.IForLoopStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIfStatement(Microsoft.CodeAnalysis.Semantics.IIfStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIncrementExpression(Microsoft.CodeAnalysis.Semantics.IIncrementExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIndexedPropertyReferenceExpression(Microsoft.CodeAnalysis.Semantics.IIndexedPropertyReferenceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitInstanceReferenceExpression(Microsoft.CodeAnalysis.Semantics.IInstanceReferenceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitInvalidExpression(Microsoft.CodeAnalysis.Semantics.IInvalidExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitInvalidStatement(Microsoft.CodeAnalysis.Semantics.IInvalidStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIsExpression(Microsoft.CodeAnalysis.Semantics.IIsExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIsTypeExpression(Microsoft.CodeAnalysis.Semantics.IIsTypeExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLabelStatement(Microsoft.CodeAnalysis.Semantics.ILabelStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLateBoundMemberReferenceExpression(Microsoft.CodeAnalysis.Semantics.ILateBoundMemberReferenceExpression operation, TArgument argument) -> TResult
......@@ -885,6 +901,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.Vi
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitParameterInitializer(Microsoft.CodeAnalysis.Semantics.IParameterInitializer operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitParameterReferenceExpression(Microsoft.CodeAnalysis.Semantics.IParameterReferenceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitParenthesizedExpression(Microsoft.CodeAnalysis.Semantics.IParenthesizedExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitPlaceholderExpression(Microsoft.CodeAnalysis.Semantics.IPlaceholderExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitPointerIndirectionReferenceExpression(Microsoft.CodeAnalysis.Semantics.IPointerIndirectionReferenceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitPropertyInitializer(Microsoft.CodeAnalysis.Semantics.IPropertyInitializer operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitPropertyReferenceExpression(Microsoft.CodeAnalysis.Semantics.IPropertyReferenceExpression operation, TArgument argument) -> TResult
......@@ -903,8 +920,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.Vi
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitTypeParameterObjectCreationExpression(Microsoft.CodeAnalysis.Semantics.ITypeParameterObjectCreationExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitUnaryOperatorExpression(Microsoft.CodeAnalysis.Semantics.IUnaryOperatorExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitUnboundLambdaExpression(Microsoft.CodeAnalysis.Semantics.IUnboundLambdaExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitUsingWithDeclarationStatement(Microsoft.CodeAnalysis.Semantics.IUsingWithDeclarationStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitUsingWithExpressionStatement(Microsoft.CodeAnalysis.Semantics.IUsingWithExpressionStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitUsingStatement(Microsoft.CodeAnalysis.Semantics.IUsingStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitVariableDeclaration(Microsoft.CodeAnalysis.Semantics.IVariableDeclaration operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitVariableDeclarationStatement(Microsoft.CodeAnalysis.Semantics.IVariableDeclarationStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitWhileUntilLoopStatement(Microsoft.CodeAnalysis.Semantics.IWhileUntilLoopStatement operation, TArgument argument) -> TResult
......
......@@ -8,7 +8,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundExpression
Implements IOperation
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Dim value As ConstantValue = Me.ConstantValueOpt
If value Is Nothing Then
......@@ -19,25 +19,25 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IKind As OperationKind Implements IOperation.Kind
Private ReadOnly Property IOperation_Kind As OperationKind Implements IOperation.Kind
Get
Return Me.ExpressionKind()
End Get
End Property
Private ReadOnly Property IIsInvalid As Boolean Implements IOperation.IsInvalid
Private ReadOnly Property IOperation_IsInvalid As Boolean Implements IOperation.IsInvalid
Get
Return Me.HasErrors
End Get
End Property
Private ReadOnly Property IResultType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Me.Type
End Get
End Property
Private ReadOnly Property ISyntax As SyntaxNode Implements IOperation.Syntax
Private ReadOnly Property IOperation_Syntax As SyntaxNode Implements IOperation.Syntax
Get
Return Me.Syntax
End Get
......@@ -54,13 +54,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Implements IAssignmentExpression
Implements ICompoundAssignmentExpression
Private ReadOnly Property ITarget As IReferenceExpression Implements IAssignmentExpression.Target
Private ReadOnly Property IAssignmentExpression_Target As IReferenceExpression Implements IAssignmentExpression.Target
Get
Return TryCast(Me.Left, IReferenceExpression)
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements IAssignmentExpression.Value
Private ReadOnly Property IAssignmentExpression_Value As IOperation Implements IAssignmentExpression.Value
Get
If ExpressionKind() = OperationKind.CompoundAssignmentExpression Then
Dim rightBinary As BoundBinaryOperator = TryCast(Me.Right, BoundBinaryOperator)
......@@ -78,7 +78,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IBinaryKind As BinaryOperationKind Implements ICompoundAssignmentExpression.BinaryOperationKind
Private ReadOnly Property ICompoundAssignmentExpression_BinaryOperationKind As BinaryOperationKind Implements ICompoundAssignmentExpression.BinaryOperationKind
Get
If ExpressionKind() = OperationKind.CompoundAssignmentExpression Then
Dim rightBinary As BoundBinaryOperator = TryCast(Me.Right, BoundBinaryOperator)
......@@ -92,13 +92,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End If
End If
Return BinaryOperationKind.None
Return BinaryOperationKind.Invalid
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
If Me.IUsesOperatorMethod Then
If Me.IHasOperatorMethodExpression_UsesOperatorMethod Then
Return DirectCast(Me.Right, BoundUserDefinedBinaryOperator).Call.Method
End If
......@@ -106,7 +106,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
If ExpressionKind() = OperationKind.CompoundAssignmentExpression Then
Return TypeOf Me.Right Is BoundUserDefinedBinaryOperator
......@@ -154,7 +154,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundMeReference
Implements IInstanceReferenceExpression
Private ReadOnly Property IInstanceReferenceKind As InstanceReferenceKind Implements IInstanceReferenceExpression.InstanceReferenceKind
Private ReadOnly Property IInstanceReferenceExpression_InstanceReferenceKind As InstanceReferenceKind Implements IInstanceReferenceExpression.InstanceReferenceKind
Get
Return If(Me.WasCompilerGenerated, InstanceReferenceKind.Implicit, InstanceReferenceKind.Explicit)
End Get
......@@ -176,7 +176,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundMyBaseReference
Implements IInstanceReferenceExpression
Private ReadOnly Property IInstanceReferenceKind As InstanceReferenceKind Implements IInstanceReferenceExpression.InstanceReferenceKind
Private ReadOnly Property IInstanceReferenceExpression_InstanceReferenceKind As InstanceReferenceKind Implements IInstanceReferenceExpression.InstanceReferenceKind
Get
Return InstanceReferenceKind.BaseClass
End Get
......@@ -198,7 +198,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundMyClassReference
Implements IInstanceReferenceExpression
Private ReadOnly Property IInstanceReferenceKind As InstanceReferenceKind Implements IInstanceReferenceExpression.InstanceReferenceKind
Private ReadOnly Property IInstanceReferenceExpression_InstanceReferenceKind As InstanceReferenceKind Implements IInstanceReferenceExpression.InstanceReferenceKind
Get
Return InstanceReferenceKind.ThisClass
End Get
......@@ -220,7 +220,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundLiteral
Implements ILiteralExpression
Private ReadOnly Property ISpelling As String Implements ILiteralExpression.Text
Private ReadOnly Property ILiteralExpression_Text As String Implements ILiteralExpression.Text
Get
Return Me.Syntax.ToString()
End Get
......@@ -242,7 +242,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundAwaitOperator
Implements IAwaitExpression
Private ReadOnly Property IUpon As IOperation Implements IAwaitExpression.AwaitedValue
Private ReadOnly Property IAwaitExpression_AwaitedValue As IOperation Implements IAwaitExpression.AwaitedValue
Get
Return Me.Operand
End Get
......@@ -264,13 +264,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundLambda
Implements ILambdaExpression
Private ReadOnly Property IBody As IBlockStatement Implements ILambdaExpression.Body
Private ReadOnly Property ILambdaExpression_Body As IBlockStatement Implements ILambdaExpression.Body
Get
Return Me.Body
End Get
End Property
Private ReadOnly Property ISignature As IMethodSymbol Implements ILambdaExpression.Signature
Private ReadOnly Property ILambdaExpression_Signature As IMethodSymbol Implements ILambdaExpression.Signature
Get
Return Me.LambdaSymbol
End Get
......@@ -292,23 +292,23 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundCall
Implements IInvocationExpression
Private Function IArgumentMatchingParameter(parameter As IParameterSymbol) As IArgument Implements IHasArgumentsExpression.GetArgumentMatchingParameter
Private Function IHasArgumentsExpression_GetArgumentMatchingParameter(parameter As IParameterSymbol) As IArgument Implements IHasArgumentsExpression.GetArgumentMatchingParameter
Return ArgumentMatchingParameter(Me.Arguments, parameter, Me.Method.Parameters)
End Function
Private ReadOnly Property IArgumentsInSourceOrder As ImmutableArray(Of IArgument) Implements IInvocationExpression.ArgumentsInSourceOrder
Private ReadOnly Property IInvocationExpression_ArgumentsInSourceOrder As ImmutableArray(Of IArgument) Implements IInvocationExpression.ArgumentsInSourceOrder
Get
Return DeriveArguments(Me.Arguments, Me.Method.Parameters)
End Get
End Property
Private ReadOnly Property IArgumentsInParameterOrder As ImmutableArray(Of IArgument) Implements IHasArgumentsExpression.ArgumentsInParameterOrder
Private ReadOnly Property IHasArgumentsExpression_ArgumentsInParameterOrder As ImmutableArray(Of IArgument) Implements IHasArgumentsExpression.ArgumentsInParameterOrder
Get
Return DeriveArguments(Me.Arguments, Me.Method.Parameters)
End Get
End Property
Private ReadOnly Property IIsVirtual As Boolean Implements IInvocationExpression.IsVirtual
Private ReadOnly Property IInvocationExpression_IsVirtual As Boolean Implements IInvocationExpression.IsVirtual
Get
Dim method As IMethodSymbol = Me.Method
......@@ -316,13 +316,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property TargetMethod As IMethodSymbol Implements IInvocationExpression.TargetMethod
Private ReadOnly Property IInvocationExpression_TargetMethod As IMethodSymbol Implements IInvocationExpression.TargetMethod
Get
Return Me.Method
End Get
End Property
Private ReadOnly Property IInstance As IOperation Implements IInvocationExpression.Instance
Private ReadOnly Property IInvocationExpression_Instance As IOperation Implements IInvocationExpression.Instance
Get
If Me.Method.IsShared Then
Return Nothing
......@@ -421,13 +421,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return visitor.VisitArgument(Me, argument)
End Function
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -527,7 +527,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundParenthesized
Implements IParenthesizedExpression
Private ReadOnly Property IOperand As IOperation Implements IParenthesizedExpression.Operand
Private ReadOnly Property IParenthesizedExpression_Operand As IOperation Implements IParenthesizedExpression.Operand
Get
Return Me.Expression
End Get
......@@ -549,13 +549,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundArrayAccess
Implements IArrayElementReferenceExpression
Private ReadOnly Property IArrayReference As IOperation Implements IArrayElementReferenceExpression.ArrayReference
Private ReadOnly Property IArrayElementReferenceExpression_ArrayReference As IOperation Implements IArrayElementReferenceExpression.ArrayReference
Get
Return Me.Expression
End Get
End Property
Private ReadOnly Property IIndices As ImmutableArray(Of IOperation) Implements IArrayElementReferenceExpression.Indices
Private ReadOnly Property IArrayElementReferenceExpression_Indices As ImmutableArray(Of IOperation) Implements IArrayElementReferenceExpression.Indices
Get
Return Me.Indices.As(Of IOperation)()
End Get
......@@ -577,25 +577,25 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundUnaryOperator
Implements IUnaryOperatorExpression
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return False
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IUnaryOperatorExpression.Operand
Private ReadOnly Property IUnaryOperatorExpression_Operand As IOperation Implements IUnaryOperatorExpression.Operand
Get
Return Me.Operand
End Get
End Property
Private ReadOnly Property IUnaryOperationKind As UnaryOperationKind Implements IUnaryOperatorExpression.UnaryOperationKind
Private ReadOnly Property IUnaryOperatorExpression_UnaryOperationKind As UnaryOperationKind Implements IUnaryOperatorExpression.UnaryOperationKind
Get
Return DeriveUnaryOperationKind(Me.OperatorKind, Me.Operand)
End Get
......@@ -617,25 +617,25 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundUserDefinedUnaryOperator
Implements IUnaryOperatorExpression
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Me.Call.Method
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return True
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IUnaryOperatorExpression.Operand
Private ReadOnly Property IUnaryOperatorExpression_Operand As IOperation Implements IUnaryOperatorExpression.Operand
Get
Return Me.Operand
End Get
End Property
Private ReadOnly Property IUnaryOperationKind As UnaryOperationKind Implements IUnaryOperatorExpression.UnaryOperationKind
Private ReadOnly Property IUnaryOperatorExpression_UnaryOperationKind As UnaryOperationKind Implements IUnaryOperatorExpression.UnaryOperationKind
Get
Select Case OperatorKind And UnaryOperatorKind.OpMask
Case UnaryOperatorKind.Plus
......@@ -666,31 +666,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundBinaryOperator
Implements IBinaryOperatorExpression
Private ReadOnly Property ILeft As IOperation Implements IBinaryOperatorExpression.Left
Private ReadOnly Property IBinaryOperatorExpression_LeftOperand As IOperation Implements IBinaryOperatorExpression.LeftOperand
Get
Return Me.Left
End Get
End Property
Private ReadOnly Property IBinaryKind As BinaryOperationKind Implements IBinaryOperatorExpression.BinaryOperationKind
Private ReadOnly Property IBinaryOperatorExpression_BinaryOperationKind As BinaryOperationKind Implements IBinaryOperatorExpression.BinaryOperationKind
Get
Return DeriveBinaryOperationKind(Me.OperatorKind, Me.Left)
End Get
End Property
Private ReadOnly Property IRight As IOperation Implements IBinaryOperatorExpression.Right
Private ReadOnly Property IBinaryOperatorExpression_RightOperand As IOperation Implements IBinaryOperatorExpression.RightOperand
Get
Return Me.Right
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return False
End Get
......@@ -709,16 +709,16 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Friend Partial Class BoundUserDefinedBinaryOperator
Partial Friend Class BoundUserDefinedBinaryOperator
Implements IBinaryOperatorExpression
Private ReadOnly Property ILeft As IOperation Implements IBinaryOperatorExpression.Left
Private ReadOnly Property IBinaryOperatorExpression_LeftOperand As IOperation Implements IBinaryOperatorExpression.LeftOperand
Get
Return Me.Left
End Get
End Property
Private ReadOnly Property IBinaryKind As BinaryOperationKind Implements IBinaryOperatorExpression.BinaryOperationKind
Private ReadOnly Property IBinaryOperatorExpression_BinaryOperationKind As BinaryOperationKind Implements IBinaryOperatorExpression.BinaryOperationKind
Get
Select Case OperatorKind And BinaryOperatorKind.OpMask
Case BinaryOperatorKind.Add
......@@ -763,19 +763,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IRight As IOperation Implements IBinaryOperatorExpression.Right
Private ReadOnly Property IBinaryOperatorExpression_RightOperand As IOperation Implements IBinaryOperatorExpression.RightOperand
Get
Return Me.Right
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Me.Call.Method
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return True
End Get
......@@ -804,16 +804,16 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Friend Partial Class BoundBinaryConditionalExpression
Partial Friend Class BoundBinaryConditionalExpression
Implements INullCoalescingExpression
Private ReadOnly Property IPrimary As IOperation Implements INullCoalescingExpression.Primary
Private ReadOnly Property INullCoalescingExpression_PrimaryOperand As IOperation Implements INullCoalescingExpression.PrimaryOperand
Get
Return Me.TestExpression
End Get
End Property
Private ReadOnly Property ISecondary As IOperation Implements INullCoalescingExpression.Secondary
Private ReadOnly Property INullCoalescingExpression_SecondaryOperand As IOperation Implements INullCoalescingExpression.SecondaryOperand
Get
Return Me.ElseExpression
End Get
......@@ -832,34 +832,34 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Friend Partial Class BoundUserDefinedShortCircuitingOperator
Partial Friend Class BoundUserDefinedShortCircuitingOperator
Implements IBinaryOperatorExpression
Private ReadOnly Property ILeft As IOperation Implements IBinaryOperatorExpression.Left
Private ReadOnly Property IBinaryOperatorExpression_LeftOperand As IOperation Implements IBinaryOperatorExpression.LeftOperand
Get
Return Me.LeftOperand
End Get
End Property
Private ReadOnly Property IBinaryKind As BinaryOperationKind Implements IBinaryOperatorExpression.BinaryOperationKind
Private ReadOnly Property IBinaryOperatorExpression_BinaryOperationKind As BinaryOperationKind Implements IBinaryOperatorExpression.BinaryOperationKind
Get
Return If((Me.BitwiseOperator.OperatorKind And BinaryOperatorKind.And) <> 0, BinaryOperationKind.OperatorMethodConditionalAnd, BinaryOperationKind.OperatorMethodConditionalOr)
End Get
End Property
Private ReadOnly Property IRight As IOperation Implements IBinaryOperatorExpression.Right
Private ReadOnly Property IBinaryOperatorExpression_RightOperand As IOperation Implements IBinaryOperatorExpression.RightOperand
Get
Return Me.BitwiseOperator.Right
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Me.BitwiseOperator.Call.Method
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return True
End Get
......@@ -897,31 +897,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundTryCast
Implements IConversionExpression
Private ReadOnly Property IConversion As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Private ReadOnly Property IConversionExpression_ConversionKind As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Get
Return Semantics.ConversionKind.TryCast
End Get
End Property
Private ReadOnly Property IIsExplicit As Boolean Implements IConversionExpression.IsExplicit
Private ReadOnly Property IConversionExpresson_IsExplicit As Boolean Implements IConversionExpression.IsExplicit
Get
Return True
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IConversionExpression.Operand
Private ReadOnly Property IConversionExpression_Operand As IOperation Implements IConversionExpression.Operand
Get
Return Me.Operand
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return False
End Get
......@@ -943,31 +943,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundDirectCast
Implements IConversionExpression
Private ReadOnly Property IConversion As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Private ReadOnly Property IConversionExpression_ConversionKind As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Get
Return Semantics.ConversionKind.Cast
End Get
End Property
Private ReadOnly Property IIsExplicit As Boolean Implements IConversionExpression.IsExplicit
Private ReadOnly Property IConversionExpression_IsExplicit As Boolean Implements IConversionExpression.IsExplicit
Get
Return True
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IConversionExpression.Operand
Private ReadOnly Property IConversionExpression_Operand As IOperation Implements IConversionExpression.Operand
Get
Return Me.Operand
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return False
End Get
......@@ -989,31 +989,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundConversion
Implements IConversionExpression
Private ReadOnly Property IConversion As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Private ReadOnly Property IConversionExpression_ConversionKind As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Get
Return Semantics.ConversionKind.Basic
End Get
End Property
Private ReadOnly Property IIsExplicit As Boolean Implements IConversionExpression.IsExplicit
Private ReadOnly Property IConversionExpression_IsExplicit As Boolean Implements IConversionExpression.IsExplicit
Get
Return Me.ExplicitCastInCode
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IConversionExpression.Operand
Private ReadOnly Property IConversinExpression_Operand As IOperation Implements IConversionExpression.Operand
Get
Return Me.Operand
End Get
End Property
Private ReadOnly Property IOperator As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return False
End Get
......@@ -1035,31 +1035,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundUserDefinedConversion
Implements IConversionExpression
Private ReadOnly Property IConversion As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Private ReadOnly Property IConversionExpression_ConversionKind As Semantics.ConversionKind Implements IConversionExpression.ConversionKind
Get
Return Semantics.ConversionKind.OperatorMethod
End Get
End Property
Private ReadOnly Property IIsExplicit As Boolean Implements IConversionExpression.IsExplicit
Private ReadOnly Property IConversionExpression_IsExplicit As Boolean Implements IConversionExpression.IsExplicit
Get
Return Not Me.WasCompilerGenerated
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IConversionExpression.Operand
Private ReadOnly Property IConversionExpression_Operand As IOperation Implements IConversionExpression.Operand
Get
Return Me.Operand
End Get
End Property
Private ReadOnly Property IOperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_OperatorMethod As IMethodSymbol Implements IHasOperatorMethodExpression.OperatorMethod
Get
Return Me.Call.Method
End Get
End Property
Private ReadOnly Property IUsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Private ReadOnly Property IHasOperatorMethodExpression_UsesOperatorMethod As Boolean Implements IHasOperatorMethodExpression.UsesOperatorMethod
Get
Return True
End Get
......@@ -1081,19 +1081,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundTernaryConditionalExpression
Implements IConditionalChoiceExpression
Private ReadOnly Property ICondition As IOperation Implements IConditionalChoiceExpression.Condition
Private ReadOnly Property IConditionalChoiceExpression_Condition As IOperation Implements IConditionalChoiceExpression.Condition
Get
Return Me.Condition
End Get
End Property
Private ReadOnly Property IIfFalse As IOperation Implements IConditionalChoiceExpression.IfFalseValue
Private ReadOnly Property IConditionalChoiceExpression_IfFalseValue As IOperation Implements IConditionalChoiceExpression.IfFalseValue
Get
Return Me.WhenFalse
End Get
End Property
Private ReadOnly Property IIfTrue As IOperation Implements IConditionalChoiceExpression.IfTrueValue
Private ReadOnly Property IConditionalChoiceExpression_IfTrueValue As IOperation Implements IConditionalChoiceExpression.IfTrueValue
Get
Return Me.WhenTrue
End Get
......@@ -1113,30 +1113,30 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Class
Friend Partial Class BoundTypeOf
Implements IIsExpression
Implements IIsTypeExpression
Private ReadOnly Property IIsType As ITypeSymbol Implements IIsExpression.IsType
Private ReadOnly Property IIsTypeExpression_IsType As ITypeSymbol Implements IIsTypeExpression.IsType
Get
Return Me.TargetType
End Get
End Property
Private ReadOnly Property IOperand As IOperation Implements IIsExpression.Operand
Private ReadOnly Property IIsTypeExpression_Operand As IOperation Implements IIsTypeExpression.Operand
Get
Return Me.Operand
End Get
End Property
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.IsExpression
Return OperationKind.IsTypeExpression
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
visitor.VisitIsExpression(Me)
visitor.VisitIsTypeExpression(Me)
End Sub
Public Overrides Function Accept(Of TArgument, TResult)(visitor As OperationVisitor(Of TArgument, TResult), argument As TArgument) As TResult
Return visitor.VisitIsExpression(Me, argument)
Return visitor.VisitIsTypeExpression(Me, argument)
End Function
End Class
......@@ -1145,23 +1145,23 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_memberInitializersMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundObjectCreationExpression, Object)
Private Function IArgumentMatchingParameter(parameter As IParameterSymbol) As IArgument Implements IHasArgumentsExpression.GetArgumentMatchingParameter
Private Function IHasArgumentExpression_GetArgumentMatchingParameter(parameter As IParameterSymbol) As IArgument Implements IHasArgumentsExpression.GetArgumentMatchingParameter
Return BoundCall.ArgumentMatchingParameter(Me.Arguments, parameter, Me.ConstructorOpt.Parameters)
End Function
Private ReadOnly Property IConstructor As IMethodSymbol Implements IObjectCreationExpression.Constructor
Private ReadOnly Property IObjectCreationExpression_Constructor As IMethodSymbol Implements IObjectCreationExpression.Constructor
Get
Return Me.ConstructorOpt
End Get
End Property
Private ReadOnly Property IConstructorArguments As ImmutableArray(Of IArgument) Implements IHasArgumentsExpression.ArgumentsInParameterOrder
Private ReadOnly Property IHasArgumentsExpression_ArgumentsInParameterOrder As ImmutableArray(Of IArgument) Implements IHasArgumentsExpression.ArgumentsInParameterOrder
Get
Return BoundCall.DeriveArguments(Me.Arguments, Me.ConstructorOpt.Parameters)
End Get
End Property
Private ReadOnly Property IMemberInitializers As ImmutableArray(Of ISymbolInitializer) Implements IObjectCreationExpression.MemberInitializers
Private ReadOnly Property IObjectCreationExpression_MemberInitializers As ImmutableArray(Of ISymbolInitializer) Implements IObjectCreationExpression.MemberInitializers
Get
Dim initializer = s_memberInitializersMappings.GetValue(Me, Function(objectCreationStatement)
Dim objectInitializerExpression As BoundObjectInitializerExpressionBase = Me.InitializerOpt
......@@ -1252,13 +1252,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -1316,13 +1316,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -1350,13 +1350,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundArrayCreation
Implements IArrayCreationExpression
Private ReadOnly Property IDimensionSizes As ImmutableArray(Of IOperation) Implements IArrayCreationExpression.DimensionSizes
Private ReadOnly Property IArrayCreationExpression_DimensionSizes As ImmutableArray(Of IOperation) Implements IArrayCreationExpression.DimensionSizes
Get
Return Me.Bounds.As(Of IOperation)()
End Get
End Property
Private ReadOnly Property IElementType As ITypeSymbol Implements IArrayCreationExpression.ElementType
Private ReadOnly Property IArrayCreationExpression_ElementType As ITypeSymbol Implements IArrayCreationExpression.ElementType
Get
Dim arrayType As IArrayTypeSymbol = TryCast(Me.Type, IArrayTypeSymbol)
If arrayType IsNot Nothing Then
......@@ -1367,7 +1367,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IInitializer As IArrayInitializer Implements IArrayCreationExpression.Initializer
Private ReadOnly Property IArrayCreationExpression_Initializer As IArrayInitializer Implements IArrayCreationExpression.Initializer
Get
Dim initializer As BoundArrayInitialization = Me.InitializerOpt
Return initializer
......@@ -1390,7 +1390,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundArrayInitialization
Implements IArrayInitializer
Public ReadOnly Property ElementValues As ImmutableArray(Of IOperation) Implements IArrayInitializer.ElementValues
Private ReadOnly Property IArrayInitializer_ElementValues As ImmutableArray(Of IOperation) Implements IArrayInitializer.ElementValues
Get
Return Me.Initializers.As(Of IOperation)()
End Get
......@@ -1409,9 +1409,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Class
Friend Partial Class BoundPropertyAccess
Implements IPropertyReferenceExpression
Implements IIndexedPropertyReferenceExpression
Private ReadOnly Property IInstance As IOperation Implements IMemberReferenceExpression.Instance
Private ReadOnly Property IMemberReferenceExpression_Instance As IOperation Implements IMemberReferenceExpression.Instance
Get
If Me.PropertySymbol.IsShared Then
Return Nothing
......@@ -1421,35 +1421,45 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IMember As ISymbol Implements IMemberReferenceExpression.Member
Private ReadOnly Property IMemberReferenceExpression_Member As ISymbol Implements IMemberReferenceExpression.Member
Get
Return Me.PropertySymbol
End Get
End Property
Private ReadOnly Property IProperty As IPropertySymbol Implements IPropertyReferenceExpression.Property
Private ReadOnly Property IPropertyReferenceExpression_Property As IPropertySymbol Implements IPropertyReferenceExpression.Property
Get
Return Me.PropertySymbol
End Get
End Property
Private ReadOnly Property IHasArgumentsExpression_ArgumentsInParameterOrder As ImmutableArray(Of IArgument) Implements IHasArgumentsExpression.ArgumentsInParameterOrder
Get
Return BoundCall.DeriveArguments(Me.Arguments, Me.PropertySymbol.Parameters)
End Get
End Property
Private Function IHasArgumentsExpression_GetArgumentMatchingParameter(parameter As IParameterSymbol) As IArgument Implements IHasArgumentsExpression.GetArgumentMatchingParameter
Return BoundCall.ArgumentMatchingParameter(Me.Arguments, parameter, Me.PropertySymbol.Parameters)
End Function
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.PropertyReferenceExpression
Return If(Me.Arguments.Length > 0, OperationKind.IndexedPropertyReferenceExpression, OperationKind.PropertyReferenceExpression)
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
visitor.VisitPropertyReferenceExpression(Me)
visitor.VisitIndexedPropertyReferenceExpression(Me)
End Sub
Public Overrides Function Accept(Of TArgument, TResult)(visitor As OperationVisitor(Of TArgument, TResult), argument As TArgument) As TResult
Return visitor.VisitPropertyReferenceExpression(Me, argument)
Return visitor.VisitIndexedPropertyReferenceExpression(Me, argument)
End Function
End Class
Friend Partial Class BoundEventAccess
Implements IEventReferenceExpression
Private ReadOnly Property IInstance As IOperation Implements IMemberReferenceExpression.Instance
Private ReadOnly Property IMemberReferenceExpression_Instance As IOperation Implements IMemberReferenceExpression.Instance
Get
If Me.EventSymbol.IsShared Then
Return Nothing
......@@ -1459,13 +1469,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IMember As ISymbol Implements IMemberReferenceExpression.Member
Private ReadOnly Property IMemberReferenceExpression_Member As ISymbol Implements IMemberReferenceExpression.Member
Get
Return Me.EventSymbol
End Get
End Property
Private ReadOnly Property IEvent As IEventSymbol Implements IEventReferenceExpression.Event
Private ReadOnly Property IEventReferenceExpression_Event As IEventSymbol Implements IEventReferenceExpression.Event
Get
Return Me.EventSymbol
End Get
......@@ -1487,7 +1497,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundDelegateCreationExpression
Implements IMethodBindingExpression
Private ReadOnly Property IInstance As IOperation Implements IMemberReferenceExpression.Instance
Private ReadOnly Property IMemberReferenceExpression_Instance As IOperation Implements IMemberReferenceExpression.Instance
Get
If Me.Method.IsShared Then
Return Nothing
......@@ -1497,19 +1507,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IIsVirtual As Boolean Implements IMethodBindingExpression.IsVirtual
Private ReadOnly Property IMethodBindingExpression_IsVirtual As Boolean Implements IMethodBindingExpression.IsVirtual
Get
Return Me.Method IsNot Nothing AndAlso (Me.Method.IsOverridable OrElse Me.Method.IsOverrides OrElse Me.Method.IsMustOverride) AndAlso Not Me.SuppressVirtualCalls
End Get
End Property
Private ReadOnly Property IMember As ISymbol Implements IMemberReferenceExpression.Member
Private ReadOnly Property IMemberReferenceExpression_Member As ISymbol Implements IMemberReferenceExpression.Member
Get
Return Me.Method
End Get
End Property
Private ReadOnly Property IMethod As IMethodSymbol Implements IMethodBindingExpression.Method
Private ReadOnly Property IMethodBindingExpression_Method As IMethodSymbol Implements IMethodBindingExpression.Method
Get
Return Me.Method
End Get
......@@ -1531,13 +1541,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundFieldAccess
Implements IFieldReferenceExpression
Private ReadOnly Property IField As IFieldSymbol Implements IFieldReferenceExpression.Field
Private ReadOnly Property IFieldReferenceExpression_Field As IFieldSymbol Implements IFieldReferenceExpression.Field
Get
Return Me.FieldSymbol
End Get
End Property
Private ReadOnly Property IInstance As IOperation Implements IMemberReferenceExpression.Instance
Private ReadOnly Property IMemberReferenceExpression_Instance As IOperation Implements IMemberReferenceExpression.Instance
Get
If Me.FieldSymbol.IsShared Then
Return Nothing
......@@ -1547,7 +1557,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IMember As ISymbol Implements IMemberReferenceExpression.Member
Private ReadOnly Property IMemberReferenceExpression_Member As ISymbol Implements IMemberReferenceExpression.Member
Get
Return Me.FieldSymbol
End Get
......@@ -1569,12 +1579,18 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundConditionalAccess
Implements IConditionalAccessExpression
Private ReadOnly Property IAccess As IOperation Implements IConditionalAccessExpression.Access
Private ReadOnly Property IConditionalAccessExpression_ConditionalValue As IOperation Implements IConditionalAccessExpression.ConditionalValue
Get
Return Me.AccessExpression
End Get
End Property
Private ReadOnly Property IConditionalAccessExpression_ConditionalInstance As IOperation Implements IConditionalAccessExpression.ConditionalInstance
Get
Return Me.Receiver
End Get
End Property
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.ConditionalAccessExpression
End Function
......@@ -1588,10 +1604,26 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Partial Friend Class BoundConditionalAccessReceiverPlaceholder
Implements IConditionalAccessInstanceExpression
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.ConditionalAccessInstanceExpression
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
visitor.VisitConditionalAccessInstanceExpression(Me)
End Sub
Public Overrides Function Accept(Of TArgument, TResult)(visitor As OperationVisitor(Of TArgument, TResult), argument As TArgument) As TResult
Return visitor.VisitConditionalAccessInstanceExpression(Me, argument)
End Function
End Class
Friend Partial Class BoundParameter
Implements IParameterReferenceExpression
Private ReadOnly Property IParameter As IParameterSymbol Implements IParameterReferenceExpression.Parameter
Private ReadOnly Property IParameterReferenceExpression_Parameter As IParameterSymbol Implements IParameterReferenceExpression.Parameter
Get
Return Me.ParameterSymbol
End Get
......@@ -1613,7 +1645,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundLocal
Implements ILocalReferenceExpression
Private ReadOnly Property ILocal As ILocalSymbol Implements ILocalReferenceExpression.Local
Private ReadOnly Property ILocalReferenceExpression_Local As ILocalSymbol Implements ILocalReferenceExpression.Local
Get
Return Me.LocalSymbol
End Get
......@@ -1635,13 +1667,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundLateMemberAccess
Implements ILateBoundMemberReferenceExpression
Private ReadOnly Property IInstance As IOperation Implements ILateBoundMemberReferenceExpression.Instance
Private ReadOnly Property ILateBoundMemberReferenceExpression_Instance As IOperation Implements ILateBoundMemberReferenceExpression.Instance
Get
Return Me.ReceiverOpt
End Get
End Property
Private ReadOnly Property IMemberName As String Implements ILateBoundMemberReferenceExpression.MemberName
Private ReadOnly Property ILateBoundMemberReferenceExpression_MemberName As String Implements ILateBoundMemberReferenceExpression.MemberName
Get
Return Me.NameOpt
End Get
......@@ -1663,13 +1695,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundFieldInitializer
Implements IFieldInitializer
Private ReadOnly Property IInitializedFields As ImmutableArray(Of IFieldSymbol) Implements IFieldInitializer.InitializedFields
Private ReadOnly Property IFieldInitializer_InitializedFields As ImmutableArray(Of IFieldSymbol) Implements IFieldInitializer.InitializedFields
Get
Return ImmutableArray(Of IFieldSymbol).CastUp(Me.InitializedFields)
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements ISymbolInitializer.Value
Private ReadOnly Property ISymbolInitializer_Value As IOperation Implements ISymbolInitializer.Value
Get
Return Me.InitialValue
End Get
......@@ -1691,13 +1723,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundPropertyInitializer
Implements IPropertyInitializer
Private ReadOnly Property IInitializedProperty As IPropertySymbol Implements IPropertyInitializer.InitializedProperty
Private ReadOnly Property IPropertyInitializer_InitializedProperty As IPropertySymbol Implements IPropertyInitializer.InitializedProperty
Get
Return Me.InitializedProperties.FirstOrDefault()
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements ISymbolInitializer.Value
Private ReadOnly Property ISymbolInitializer_Value As IOperation Implements ISymbolInitializer.Value
Get
Return Me.InitialValue
End Get
......@@ -1719,43 +1751,43 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundParameterEqualsValue
Implements IParameterInitializer
Private ReadOnly Property IIsInvalid As Boolean Implements IOperation.IsInvalid
Private ReadOnly Property IOperation_IsInvalid As Boolean Implements IOperation.IsInvalid
Get
Return DirectCast(Me.Value, IOperation).IsInvalid
End Get
End Property
Private ReadOnly Property IKind As OperationKind Implements IOperation.Kind
Private ReadOnly Property IOperation_Kind As OperationKind Implements IOperation.Kind
Get
Return OperationKind.ParameterInitializerAtDeclaration
End Get
End Property
Private ReadOnly Property ISyntax As SyntaxNode Implements IOperation.Syntax
Private ReadOnly Property IOperation_Syntax As SyntaxNode Implements IOperation.Syntax
Get
Return Me.Syntax
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements ISymbolInitializer.Value
Private ReadOnly Property ISymbolInitializer_Value As IOperation Implements ISymbolInitializer.Value
Get
Return Me.Value
End Get
End Property
Private ReadOnly Property IParameter As IParameterSymbol Implements IParameterInitializer.Parameter
Private ReadOnly Property IParameterInitializer_Parameter As IParameterSymbol Implements IParameterInitializer.Parameter
Get
Return Me._Parameter
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -1826,17 +1858,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Friend Partial Class BoundRValuePlaceholder
Partial Friend Class BoundRValuePlaceholder
Implements IPlaceholderExpression
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.None
Return OperationKind.PlaceholderExpression
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
visitor.VisitNoneOperation(Me)
visitor.VisitPlaceholderExpression(Me)
End Sub
Public Overrides Function Accept(Of TArgument, TResult)(visitor As OperationVisitor(Of TArgument, TResult), argument As TArgument) As TResult
Return visitor.VisitNoneOperation(Me, argument)
Return visitor.VisitPlaceholderExpression(Me, argument)
End Function
End Class
......@@ -2722,20 +2756,6 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Function
End Class
Friend Partial Class BoundConditionalAccessReceiverPlaceholder
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.None
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
visitor.VisitNoneOperation(Me)
End Sub
Public Overrides Function Accept(Of TArgument, TResult)(visitor As OperationVisitor(Of TArgument, TResult), argument As TArgument) As TResult
Return visitor.VisitNoneOperation(Me, argument)
End Function
End Class
Friend Partial Class BoundLoweredConditionalAccess
Protected Overrides Function ExpressionKind() As OperationKind
Return OperationKind.None
......@@ -2848,7 +2868,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Select
End Select
Throw ExceptionUtilities.UnexpectedValue(operatorKind And UnaryOperatorKind.OpMask)
Return UnaryOperationKind.Invalid
End Function
Friend Function DeriveBinaryOperationKind(operatorKind As BinaryOperatorKind, left As BoundExpression) As BinaryOperationKind
......@@ -3081,8 +3101,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Select
End If
Throw ExceptionUtilities.UnexpectedValue(operatorKind And BinaryOperatorKind.OpMask)
Return BinaryOperationKind.Invalid
End Function
End Module
End Namespace
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
' Copyright (c) Microsoft. All Rights Reserved. Licensedf under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis.Semantics
......@@ -9,31 +9,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Partial Friend Class BoundStatement
Implements IOperation
Private ReadOnly Property IKind As OperationKind Implements IOperation.Kind
Private ReadOnly Property IOperation_Kind As OperationKind Implements IOperation.Kind
Get
Return Me.StatementKind()
End Get
End Property
Private ReadOnly Property IIsInvalid As Boolean Implements IOperation.IsInvalid
Private ReadOnly Property IOperation_IsInvalid As Boolean Implements IOperation.IsInvalid
Get
Return Me.HasErrors
End Get
End Property
Private ReadOnly Property ISyntax As SyntaxNode Implements IOperation.Syntax
Private ReadOnly Property IOperation_Syntax As SyntaxNode Implements IOperation.Syntax
Get
Return Me.Syntax
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -49,19 +49,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundIfStatement
Implements IIfStatement
Private ReadOnly Property ICondition As IOperation Implements IIfStatement.Condition
Private ReadOnly Property IOperation_Condition As IOperation Implements IIfStatement.Condition
Get
Return Me.Condition
End Get
End Property
Private ReadOnly Property IIfTrue As IOperation Implements IIfStatement.IfTrueStatement
Private ReadOnly Property IIfStatement_IfTrueStatement As IOperation Implements IIfStatement.IfTrueStatement
Get
Return Me.Consequence
End Get
End Property
Private ReadOnly Property IIfFalse As IOperation Implements IIfStatement.IfFalseStatement
Private ReadOnly Property IIfStatement_IfFalseStatement As IOperation Implements IIfStatement.IfFalseStatement
Get
Return Me.AlternativeOpt
End Get
......@@ -85,7 +85,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_caseBlocksMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundSelectStatement, Object)
Private ReadOnly Property ICases As ImmutableArray(Of ISwitchCase) Implements ISwitchStatement.Cases
Private ReadOnly Property ISwitchStatement_Cases As ImmutableArray(Of ISwitchCase) Implements ISwitchStatement.Cases
Get
Dim cases = s_caseBlocksMappings.GetValue(Me, Function(boundSelect)
Return boundSelect.CaseBlocks.SelectAsArray(Function(boundCaseBlock)
......@@ -96,7 +96,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements ISwitchStatement.Value
Private ReadOnly Property ISwitchStatement_Value As IOperation Implements ISwitchStatement.Value
Get
Return Me.ExpressionStatement.Expression
End Get
......@@ -175,13 +175,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -234,19 +234,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property ICaseClass As CaseKind Implements ICaseClause.CaseKind
Private ReadOnly Property ICaseClause_CaseKind As CaseKind Implements ICaseClause.CaseKind
Get
Return CaseKind.Default
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -273,21 +273,21 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundCaseClause
Implements ICaseClause
Private ReadOnly Property IIsInvalid As Boolean Implements IOperation.IsInvalid
Private ReadOnly Property IOperation_IsInvalid As Boolean Implements IOperation.IsInvalid
Get
Return Me.HasErrors
End Get
End Property
Private ReadOnly Property ISyntax As SyntaxNode Implements IOperation.Syntax
Private ReadOnly Property IOperation_Syntax As SyntaxNode Implements IOperation.Syntax
Get
Return Me.Syntax
End Get
End Property
Protected MustOverride ReadOnly Property IKind As OperationKind Implements IOperation.Kind
Protected MustOverride ReadOnly Property IOperation_Kind As OperationKind Implements IOperation.Kind
Protected MustOverride ReadOnly Property ICaseKind As CaseKind Implements ICaseClause.CaseKind
Protected MustOverride ReadOnly Property ICaseClause_CaseKind As CaseKind Implements ICaseClause.CaseKind
Public MustOverride Overloads Sub Accept(visitor As OperationVisitor) Implements IOperation.Accept
......@@ -299,7 +299,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -309,10 +309,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundSimpleCaseClause
Implements ISingleValueCaseClause
Private ReadOnly Property IEquality As BinaryOperationKind Implements ISingleValueCaseClause.Equality
Private ReadOnly Property ISingleValueCaseClause_Equality As BinaryOperationKind Implements ISingleValueCaseClause.Equality
Get
' Can lifted operators appear here, and if so what is their correct treatment?
Dim caseValue As BoundExpression = DirectCast(Me.IValue, BoundExpression)
Dim caseValue As BoundExpression = DirectCast(Me.ISingleValueCaseClause_Value, BoundExpression)
If caseValue IsNot Nothing Then
Select Case caseValue.Type.SpecialType
Case SpecialType.System_Int32, SpecialType.System_Int64, SpecialType.System_UInt32, SpecialType.System_UInt64, SpecialType.System_UInt16, SpecialType.System_Int16, SpecialType.System_SByte, SpecialType.System_Byte, SpecialType.System_Char
......@@ -330,11 +330,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End If
End If
Return BinaryOperationKind.None
Return BinaryOperationKind.Invalid
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements ISingleValueCaseClause.Value
Private ReadOnly Property ISingleValueCaseClause_Value As IOperation Implements ISingleValueCaseClause.Value
Get
If Me.ValueOpt IsNot Nothing Then
Return Me.ValueOpt
......@@ -351,13 +351,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Protected Overrides ReadOnly Property IKind As OperationKind
Protected Overrides ReadOnly Property IOperation_Kind As OperationKind
Get
Return OperationKind.SingleValueCaseClause
End Get
End Property
Protected Overrides ReadOnly Property ICaseKind As CaseKind
Protected Overrides ReadOnly Property ICaseClause_CaseKind As CaseKind
Get
Return CaseKind.SingleValue
End Get
......@@ -375,7 +375,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundRangeCaseClause
Implements IRangeCaseClause
Private ReadOnly Property IMaximumValue As IOperation Implements IRangeCaseClause.MaximumValue
Private ReadOnly Property IRangeCaseClause_MaximumValue As IOperation Implements IRangeCaseClause.MaximumValue
Get
If Me.UpperBoundOpt IsNot Nothing Then
Return Me.UpperBoundOpt
......@@ -392,7 +392,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IMinimumValue As IOperation Implements IRangeCaseClause.MinimumValue
Private ReadOnly Property IRangeCaseClause_MinimumValue As IOperation Implements IRangeCaseClause.MinimumValue
Get
If Me.LowerBoundOpt IsNot Nothing Then
Return Me.LowerBoundOpt
......@@ -409,13 +409,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Protected Overrides ReadOnly Property IKind As OperationKind
Protected Overrides ReadOnly Property IOperation_Kind As OperationKind
Get
Return OperationKind.RangeCaseClause
End Get
End Property
Protected Overrides ReadOnly Property ICaseKind As CaseKind
Protected Overrides ReadOnly Property ICaseClause_CaseKind As CaseKind
Get
Return CaseKind.Range
End Get
......@@ -433,17 +433,18 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundRelationalCaseClause
Implements IRelationalCaseClause
Private ReadOnly Property Relation As BinaryOperationKind Implements IRelationalCaseClause.Relation
Private ReadOnly Property IRelationalCaseClause_Relation As BinaryOperationKind Implements IRelationalCaseClause.Relation
Get
If Me.Value IsNot Nothing Then
Return DeriveBinaryOperationKind(Me.OperatorKind, DirectCast(Me.Value, BoundExpression))
If Me.IRelationalCaseClause_Value IsNot Nothing Then
Return DeriveBinaryOperationKind(Me.OperatorKind, DirectCast(Me.IRelationalCaseClause_Value, BoundExpression))
End If
Return BinaryOperationKind.None
Return BinaryOperationKind.Invalid
End Get
End Property
Private ReadOnly Property Value As IOperation Implements IRelationalCaseClause.Value
Private ReadOnly Property IRelationalCaseClause_Value As IOperation Implements IRelationalCaseClause.Value
Get
If Me.OperandOpt IsNot Nothing Then
Return Me.OperandOpt
......@@ -457,13 +458,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Protected Overrides ReadOnly Property IKind As OperationKind
Protected Overrides ReadOnly Property IOperation_Kind As OperationKind
Get
Return OperationKind.RelationalCaseClause
End Get
End Property
Protected Overrides ReadOnly Property ICaseKind As CaseKind
Protected Overrides ReadOnly Property ICaseClause_CaseKind As CaseKind
Get
Return CaseKind.Relational
End Get
......@@ -497,31 +498,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundDoLoopStatement
Implements IWhileUntilLoopStatement
Private ReadOnly Property ICondition As IOperation Implements IForWhileUntilLoopStatement.Condition
Private ReadOnly Property IForWhileUntilLoopStatement_Condition As IOperation Implements IForWhileUntilLoopStatement.Condition
Get
Return Me.ConditionOpt
End Get
End Property
Private ReadOnly Property IBody As IOperation Implements ILoopStatement.Body
Private ReadOnly Property ILoopStatement_Body As IOperation Implements ILoopStatement.Body
Get
Return Me.Body
End Get
End Property
Private ReadOnly Property ILoopClass As LoopKind Implements ILoopStatement.LoopKind
Private ReadOnly Property ILoopStatement_LoopKind As LoopKind Implements ILoopStatement.LoopKind
Get
Return LoopKind.WhileUntil
End Get
End Property
Private ReadOnly Property IIsTopTest As Boolean Implements IWhileUntilLoopStatement.IsTopTest
Private ReadOnly Property IWhileUntilLoopStatement_IsTopTest As Boolean Implements IWhileUntilLoopStatement.IsTopTest
Get
Return Me.ConditionIsTop
End Get
End Property
Private ReadOnly Property IIsWhile As Boolean Implements IWhileUntilLoopStatement.IsWhile
Private ReadOnly Property IWhileUntilLoopStatement_IsWhile As Boolean Implements IWhileUntilLoopStatement.IsWhile
Get
Return Not Me.ConditionIsUntil
End Get
......@@ -545,7 +546,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_loopBottomMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundForToStatement, Object)
Private ReadOnly Property IAtLoopBottom As ImmutableArray(Of IOperation) Implements IForLoopStatement.AtLoopBottom
Private ReadOnly Property IForLoopStatement_AtLoopBottom As ImmutableArray(Of IOperation) Implements IForLoopStatement.AtLoopBottom
Get
Dim result = s_loopBottomMappings.GetValue(
Me,
......@@ -581,7 +582,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_loopTopMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundForToStatement, Object)
Private ReadOnly Property IBefore As ImmutableArray(Of IOperation) Implements IForLoopStatement.Before
Private ReadOnly Property IForLoopStatement_Before As ImmutableArray(Of IOperation) Implements IForLoopStatement.Before
Get
Dim result = s_loopTopMappings.GetValue(
Me,
......@@ -611,7 +612,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property ILocals As ImmutableArray(Of ILocalSymbol) Implements IForLoopStatement.Locals
Private ReadOnly Property IForLoopStatement_Locals As ImmutableArray(Of ILocalSymbol) Implements IForLoopStatement.Locals
Get
Return ImmutableArray(Of ILocalSymbol).Empty
End Get
......@@ -619,7 +620,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_loopConditionMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundForToStatement, IOperation)
Private ReadOnly Property ICondition As IOperation Implements IForWhileUntilLoopStatement.Condition
Private ReadOnly Property IForWhileUntilLoopStatment_Condition As IOperation Implements IForWhileUntilLoopStatement.Condition
Get
Return s_loopConditionMappings.GetValue(
Me,
......@@ -659,13 +660,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IBody As IOperation Implements ILoopStatement.Body
Private ReadOnly Property ILoopStatement_Body As IOperation Implements ILoopStatement.Body
Get
Return Me.Body
End Get
End Property
Private ReadOnly Property ILoopClass As LoopKind Implements ILoopStatement.LoopKind
Private ReadOnly Property ILoopStatement_LoopKind As LoopKind Implements ILoopStatement.LoopKind
Get
Return LoopKind.For
End Get
......@@ -751,7 +752,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundForEachStatement
Implements IForEachLoopStatement
Private ReadOnly Property IterationVariable As ILocalSymbol Implements IForEachLoopStatement.IterationVariable
Private ReadOnly Property IForEachLoopStatement_IterationVariable As ILocalSymbol Implements IForEachLoopStatement.IterationVariable
Get
Dim controlReference As ILocalReferenceExpression = TryCast(Me.ControlVariable, ILocalReferenceExpression)
If controlReference IsNot Nothing Then
......@@ -762,19 +763,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property LoopClass As LoopKind Implements ILoopStatement.LoopKind
Private ReadOnly Property ILoopStatement_LoopKind As LoopKind Implements ILoopStatement.LoopKind
Get
Return LoopKind.ForEach
End Get
End Property
Private ReadOnly Property IForEach_Collection As IOperation Implements IForEachLoopStatement.Collection
Private ReadOnly Property IForEachLoopStatement_Collection As IOperation Implements IForEachLoopStatement.Collection
Get
Return Me.Collection
End Get
End Property
Private ReadOnly Property ILoop_Body As IOperation Implements ILoopStatement.Body
Private ReadOnly Property ILoopStatement_Body As IOperation Implements ILoopStatement.Body
Get
Return Me.Body
End Get
......@@ -796,19 +797,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundTryStatement
Implements ITryStatement
Private ReadOnly Property IBody As IBlockStatement Implements ITryStatement.Body
Private ReadOnly Property ITryStatement_Body As IBlockStatement Implements ITryStatement.Body
Get
Return Me.TryBlock
End Get
End Property
Private ReadOnly Property ICatches As ImmutableArray(Of ICatchClause) Implements ITryStatement.Catches
Private ReadOnly Property ITryStatement_Catches As ImmutableArray(Of ICatchClause) Implements ITryStatement.Catches
Get
Return Me.CatchBlocks.As(Of ICatchClause)()
End Get
End Property
Private ReadOnly Property IFinallyHandler As IBlockStatement Implements ITryStatement.FinallyHandler
Private ReadOnly Property ITryStatement_FinallyHandler As IBlockStatement Implements ITryStatement.FinallyHandler
Get
Return Me.FinallyBlockOpt
End Get
......@@ -830,7 +831,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Partial Friend Class BoundCatchBlock
Implements ICatchClause
Private ReadOnly Property ICaughtType As ITypeSymbol Implements ICatchClause.CaughtType
Private ReadOnly Property ICatchClause_CaughtType As ITypeSymbol Implements ICatchClause.CaughtType
Get
If Me.ExceptionSourceOpt IsNot Nothing Then
Return Me.ExceptionSourceOpt.Type
......@@ -841,49 +842,49 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IFilter As IOperation Implements ICatchClause.Filter
Private ReadOnly Property ICatchClause_Filter As IOperation Implements ICatchClause.Filter
Get
Return Me.ExceptionFilterOpt
End Get
End Property
Private ReadOnly Property IHandler As IBlockStatement Implements ICatchClause.Handler
Private ReadOnly Property ICatchClause_Handler As IBlockStatement Implements ICatchClause.Handler
Get
Return Me.Body
End Get
End Property
Private ReadOnly Property ILocals As ILocalSymbol Implements ICatchClause.ExceptionLocal
Private ReadOnly Property ICatchClause_ExceptionLocal As ILocalSymbol Implements ICatchClause.ExceptionLocal
Get
Return Me.LocalOpt
End Get
End Property
Private ReadOnly Property IKind As OperationKind Implements IOperation.Kind
Private ReadOnly Property IOperation_Kind As OperationKind Implements IOperation.Kind
Get
Return OperationKind.CatchClause
End Get
End Property
Private ReadOnly Property IIsInvalid As Boolean Implements IOperation.IsInvalid
Private ReadOnly Property IOperation_IsInvalid As Boolean Implements IOperation.IsInvalid
Get
Return Me.HasErrors
End Get
End Property
Private ReadOnly Property ISyntax As SyntaxNode Implements IOperation.Syntax
Private ReadOnly Property IOperation_Syntax As SyntaxNode Implements IOperation.Syntax
Get
Return Me.Syntax
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -903,13 +904,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_blockStatementsMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundBlock, Object)
Private ReadOnly Property ILocals As ImmutableArray(Of ILocalSymbol) Implements IBlockStatement.Locals
Private ReadOnly Property IBlockStatement_Locals As ImmutableArray(Of ILocalSymbol) Implements IBlockStatement.Locals
Get
Return Me.Locals.As(Of ILocalSymbol)()
End Get
End Property
Private ReadOnly Property IStatements As ImmutableArray(Of IOperation) Implements IBlockStatement.Statements
Private ReadOnly Property IBlockStatement_Statements As ImmutableArray(Of IOperation) Implements IBlockStatement.Statements
Get
' This is to filter out operations of kind None.
Dim statements = s_blockStatementsMappings.GetValue(Me, Function(boundBlock)
......@@ -953,7 +954,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundReturnStatement
Implements IReturnStatement
Private ReadOnly Property IReturned As IOperation Implements IReturnStatement.ReturnedValue
Private ReadOnly Property IReturnStatement_ReturnedValue As IOperation Implements IReturnStatement.ReturnedValue
Get
Return Me.ExpressionOpt
End Get
......@@ -975,7 +976,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundThrowStatement
Implements IThrowStatement
Private ReadOnly Property IThrown As IOperation Implements IThrowStatement.ThrownObject
Private ReadOnly Property IThrowStatement_ThrownObject As IOperation Implements IThrowStatement.ThrownObject
Get
Return Me.ExpressionOpt
End Get
......@@ -997,31 +998,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundWhileStatement
Implements IWhileUntilLoopStatement
Private ReadOnly Property ICondition As IOperation Implements IForWhileUntilLoopStatement.Condition
Private ReadOnly Property IForWhileUntilLoopStatement_Condition As IOperation Implements IForWhileUntilLoopStatement.Condition
Get
Return Me.Condition
End Get
End Property
Private ReadOnly Property IBody As IOperation Implements ILoopStatement.Body
Private ReadOnly Property ILoopStatement_Body As IOperation Implements ILoopStatement.Body
Get
Return Me.Body
End Get
End Property
Private ReadOnly Property ILoopClass As LoopKind Implements ILoopStatement.LoopKind
Private ReadOnly Property ILoopStatement_LoopKind As LoopKind Implements ILoopStatement.LoopKind
Get
Return LoopKind.WhileUntil
End Get
End Property
Private ReadOnly Property IIsTopTest As Boolean Implements IWhileUntilLoopStatement.IsTopTest
Private ReadOnly Property IWhileUntilLoopStatement_IsTopTest As Boolean Implements IWhileUntilLoopStatement.IsTopTest
Get
Return True
End Get
End Property
Private ReadOnly Property IIsWhile As Boolean Implements IWhileUntilLoopStatement.IsWhile
Private ReadOnly Property IWhileUntilLoopStatement_IsWhile As Boolean Implements IWhileUntilLoopStatement.IsWhile
Get
Return True
End Get
......@@ -1045,7 +1046,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_variablesMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundDimStatement, Object)
Private ReadOnly Property IVariables As ImmutableArray(Of IVariableDeclaration) Implements IVariableDeclarationStatement.Variables
Private ReadOnly Property IVariableDeclarationStatement_Variables As ImmutableArray(Of IVariableDeclaration) Implements IVariableDeclarationStatement.Variables
Get
Dim variables = s_variablesMappings.GetValue(Me, Function(dimStatement)
Dim builder = ArrayBuilder(Of IVariableDeclaration).GetInstance()
......@@ -1082,7 +1083,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundYieldStatement
Implements IReturnStatement
Private ReadOnly Property IReturned As IOperation Implements IReturnStatement.ReturnedValue
Private ReadOnly Property IReturnStatement_ReturnedValue As IOperation Implements IReturnStatement.ReturnedValue
Get
Return Me.Expression
End Get
......@@ -1104,13 +1105,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundLabelStatement
Implements ILabelStatement
Private ReadOnly Property ILabel As ILabelSymbol Implements ILabelStatement.Label
Private ReadOnly Property ILabelStatement_Label As ILabelSymbol Implements ILabelStatement.Label
Get
Return Me.Label
End Get
End Property
Private ReadOnly Property ILabeled As IOperation Implements ILabelStatement.LabeledStatement
Private ReadOnly Property ILabelStatement_LabeledStatement As IOperation Implements ILabelStatement.LabeledStatement
Get
' The VB bound trees do not encode the statement to which the label is attached.
Return Nothing
......@@ -1133,13 +1134,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundGotoStatement
Implements IBranchStatement
Private ReadOnly Property ITarget As ILabelSymbol Implements IBranchStatement.Target
Private ReadOnly Property IBranchStatement_Target As ILabelSymbol Implements IBranchStatement.Target
Get
Return Me.Label
End Get
End Property
Private ReadOnly Property IBranchKind As BranchKind Implements IBranchStatement.BranchKind
Private ReadOnly Property IBranchStatement_BranchKind As BranchKind Implements IBranchStatement.BranchKind
Get
Return BranchKind.GoTo
End Get
......@@ -1161,13 +1162,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundContinueStatement
Implements IBranchStatement
Private ReadOnly Property ITarget As ILabelSymbol Implements IBranchStatement.Target
Private ReadOnly Property IBranchStatement_Target As ILabelSymbol Implements IBranchStatement.Target
Get
Return Me.Label
End Get
End Property
Private ReadOnly Property IBranchKind As BranchKind Implements IBranchStatement.BranchKind
Private ReadOnly Property IBranchStatement_BranchKind As BranchKind Implements IBranchStatement.BranchKind
Get
Return BranchKind.Continue
End Get
......@@ -1189,13 +1190,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundExitStatement
Implements IBranchStatement
Private ReadOnly Property ITarget As ILabelSymbol Implements IBranchStatement.Target
Private ReadOnly Property IBranchStatement_Target As ILabelSymbol Implements IBranchStatement.Target
Get
Return Me.Label
End Get
End Property
Private ReadOnly Property IBranchKind As BranchKind Implements IBranchStatement.BranchKind
Private ReadOnly Property IBranchStatement_BranchKind As BranchKind Implements IBranchStatement.BranchKind
Get
Return BranchKind.Break
End Get
......@@ -1217,13 +1218,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundSyncLockStatement
Implements ILockStatement
Private ReadOnly Property ILocked As IOperation Implements ILockStatement.LockedObject
Private ReadOnly Property ILockStatement_LockedObject As IOperation Implements ILockStatement.LockedObject
Get
Return Me.LockExpression
End Get
End Property
Private ReadOnly Property IBody As IOperation Implements ILockStatement.Body
Private ReadOnly Property ILockStatement_Body As IOperation Implements ILockStatement.Body
Get
Return Me.Body
End Get
......@@ -1335,13 +1336,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundWithStatement
Implements IWithStatement
Private ReadOnly Property IBody As IOperation Implements IWithStatement.Body
Private ReadOnly Property IWithStatement_Body As IOperation Implements IWithStatement.Body
Get
Return Me.Body
End Get
End Property
Private ReadOnly Property IValue As IOperation Implements IWithStatement.Value
Private ReadOnly Property IWithStatement_Value As IOperation Implements IWithStatement.Value
Get
Return Me.OriginalExpression
End Get
......@@ -1361,9 +1362,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Class
Friend Partial Class BoundUsingStatement
Implements IUsingWithExpressionStatement, IUsingWithDeclarationStatement
Implements IUsingStatement
Private ReadOnly Property IValue As IOperation Implements IUsingWithExpressionStatement.Value
Private ReadOnly Property IUsingStatement_Value As IOperation Implements IUsingStatement.Value
Get
Return Me.ResourceExpressionOpt
End Get
......@@ -1371,7 +1372,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private Shared ReadOnly s_variablesMappings As New System.Runtime.CompilerServices.ConditionalWeakTable(Of BoundUsingStatement, Variables)
Private ReadOnly Property IVariables As IVariableDeclarationStatement Implements IUsingWithDeclarationStatement.Declaration
Private ReadOnly Property IUsingStatement_Declaration As IVariableDeclarationStatement Implements IUsingStatement.Declaration
Get
Return s_variablesMappings.GetValue(
Me,
......@@ -1381,30 +1382,22 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IBody As IOperation Implements IUsingStatement.Body
Private ReadOnly Property IUsingStatement_Body As IOperation Implements IUsingStatement.Body
Get
Return Me.Body
End Get
End Property
Protected Overrides Function StatementKind() As OperationKind
Return If(Me._ResourceExpressionOpt Is Nothing, OperationKind.UsingWithDeclarationStatement, OperationKind.UsingWithExpressionStatement)
Return OperationKind.UsingStatement
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
If Me.StatementKind() = OperationKind.UsingWithDeclarationStatement Then
visitor.VisitUsingWithDeclarationStatement(Me)
Else
visitor.VisitUsingWithExpressionStatement(Me)
End If
visitor.VisitUsingStatement(Me)
End Sub
Public Overrides Function Accept(Of TArgument, TResult)(visitor As OperationVisitor(Of TArgument, TResult), argument As TArgument) As TResult
If Me.StatementKind() = OperationKind.UsingWithDeclarationStatement Then
Return visitor.VisitUsingWithDeclarationStatement(Me, argument)
Else
Return visitor.VisitUsingWithExpressionStatement(Me, argument)
End If
Return visitor.VisitUsingStatement(Me, argument)
End Function
Private NotInheritable Class Variables
......@@ -1442,19 +1435,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
Private ReadOnly Property IVariableDeclaration_Variables As ImmutableArray(Of IVariableDeclaration) Implements IVariableDeclarationStatement.Variables
Private ReadOnly Property IVariableDeclarationStatement_Variables As ImmutableArray(Of IVariableDeclaration) Implements IVariableDeclarationStatement.Variables
Get
Return _variables
End Get
End Property
Private ReadOnly Property IType As ITypeSymbol Implements IOperation.Type
Private ReadOnly Property IOperation_Type As ITypeSymbol Implements IOperation.Type
Get
Return Nothing
End Get
End Property
Private ReadOnly Property IConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Private ReadOnly Property IOperation_ConstantValue As [Optional](Of Object) Implements IOperation.ConstantValue
Get
Return New [Optional](Of Object)()
End Get
......@@ -1465,7 +1458,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Friend Partial Class BoundExpressionStatement
Implements IExpressionStatement
Private ReadOnly Property IOperation As IOperation Implements IExpressionStatement.Expression
Private ReadOnly Property IExpressionStatement_Expression As IOperation Implements IExpressionStatement.Expression
Get
Return Me.Expression
End Get
......@@ -1493,7 +1486,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return OperationKind.ExpressionStatement
End Function
Protected MustOverride ReadOnly Property IOperation As IOperation Implements IExpressionStatement.Expression
Protected MustOverride ReadOnly Property IExpressionStatement_Expression As IOperation Implements IExpressionStatement.Expression
Public Overrides Sub Accept(visitor As OperationVisitor)
visitor.VisitExpressionStatement(Me)
......@@ -1594,7 +1587,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Partial Friend Class BoundAddHandlerStatement
Protected Overrides ReadOnly Property IOperation As IOperation
Protected Overrides ReadOnly Property IExpressionStatement_Expression As IOperation
Get
Return s_expressionsMappings.GetValue(Me, Function(statement)
Return New EventAssignmentExpression(statement, True)
......@@ -1605,7 +1598,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Partial Friend Class BoundRemoveHandlerStatement
Protected Overrides ReadOnly Property IOperation As IOperation
Protected Overrides ReadOnly Property IExpressionStatement_Expression As IOperation
Get
Return s_expressionsMappings.GetValue(Me, Function(statement)
Return New EventAssignmentExpression(statement, False)
......
......@@ -17,7 +17,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Emit
_targetAssembly = assemblySymbol
End Sub
Public ReadOnly Property MetadataIdentity As AssemblyIdentity
Public ReadOnly Property Identity As AssemblyIdentity Implements Cci.IAssemblyReference.Identity
Get
Return _targetAssembly.Identity
End Get
......@@ -27,43 +27,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Emit
visitor.Visit(DirectCast(Me, Cci.IAssemblyReference))
End Sub
Private ReadOnly Property IAssemblyReferenceCulture As String Implements Cci.IAssemblyReference.Culture
Get
Return MetadataIdentity.CultureName
End Get
End Property
Private ReadOnly Property IAssemblyReferenceIsRetargetable As Boolean Implements Cci.IAssemblyReference.IsRetargetable
Get
Return MetadataIdentity.IsRetargetable
End Get
End Property
Private ReadOnly Property IAssemblyReferenceContentType As AssemblyContentType Implements Cci.IAssemblyReference.ContentType
Get
Return MetadataIdentity.ContentType
End Get
End Property
Private ReadOnly Property IAssemblyReferencePublicKeyToken As ImmutableArray(Of Byte) Implements Cci.IAssemblyReference.PublicKeyToken
Get
Return MetadataIdentity.PublicKeyToken
End Get
End Property
Private ReadOnly Property IAssemblyReferenceVersion As Version Implements Cci.IAssemblyReference.Version
Get
Return MetadataIdentity.Version
End Get
End Property
Private Function IAssemblyReferenceGetDisplayName() As String Implements Cci.IAssemblyReference.GetDisplayName
Return MetadataIdentity.GetDisplayName()
End Function
Private ReadOnly Property INamedEntityName As String Implements Cci.INamedEntity.Name
Get
Return MetadataIdentity.Name
Return Identity.Name
End Get
End Property
......
......@@ -135,40 +135,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Emit
Next
End Sub
Private ReadOnly Property IAssemblyReferenceCulture As String Implements Cci.IAssemblyReference.Culture
Private ReadOnly Property Identity As AssemblyIdentity Implements Cci.IAssembly.Identity
Get
Return m_SourceAssembly.Identity.CultureName
Return m_SourceAssembly.Identity
End Get
End Property
Private ReadOnly Property IAssemblyReferenceIsRetargetable As Boolean Implements Cci.IAssemblyReference.IsRetargetable
Get
Return m_SourceAssembly.Identity.IsRetargetable
End Get
End Property
Private ReadOnly Property IAssemblyReferenceContentType As AssemblyContentType Implements Cci.IAssemblyReference.ContentType
Get
Return m_SourceAssembly.Identity.ContentType
End Get
End Property
Private ReadOnly Property IAssemblyReferencePublicKeyToken As ImmutableArray(Of Byte) Implements Cci.IAssemblyReference.PublicKeyToken
Get
Return m_SourceAssembly.Identity.PublicKeyToken
End Get
End Property
Private ReadOnly Property IAssemblyReferenceVersion As Version Implements Cci.IAssemblyReference.Version
Get
Return m_SourceAssembly.Identity.Version
End Get
End Property
Private Function IAssemblyReferenceGetDisplayName() As String Implements Cci.IAssemblyReference.GetDisplayName
Return m_SourceAssembly.Identity.GetDisplayName()
End Function
Friend Overrides ReadOnly Property Name As String
Get
Return _metadataName
......
......@@ -139,10 +139,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Emit
Private Sub ValidateReferencedAssembly(assembly As AssemblySymbol, asmRef As AssemblyReference, diagnostics As DiagnosticBag)
Dim asmIdentity As AssemblyIdentity = SourceModule.ContainingAssembly.Identity
Dim refIdentity As AssemblyIdentity = asmRef.MetadataIdentity
Dim refIdentity As AssemblyIdentity = asmRef.Identity
If asmIdentity.IsStrongName AndAlso Not refIdentity.IsStrongName AndAlso
DirectCast(asmRef, Cci.IAssemblyReference).ContentType <> Reflection.AssemblyContentType.WindowsRuntime Then
asmRef.Identity.ContentType <> Reflection.AssemblyContentType.WindowsRuntime Then
' Dev12 reported error, we have changed it to a warning to allow referencing libraries
' built for platforms that don't support strong names.
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.WRN_ReferencedAssemblyDoesNotHaveStrongName, assembly), NoLocation.Singleton)
......
......@@ -126,19 +126,5 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Public Shared Function DefaultErrorFormat(symbol As Symbol) As FormattedSymbol
Return New FormattedSymbol(symbol, SymbolDisplayFormat.VisualBasicErrorMessageFormat)
End Function
Public Shared Function DefaultErrorFormatIfSpecialType(arg As Object) As Object
Dim symbol = TryCast(arg, Symbol)
If symbol Is Nothing Then
Return arg
End If
If TypeOf symbol Is TypeSymbol AndAlso DirectCast(symbol, TypeSymbol).SpecialType <> SpecialType.None Then
Return DefaultErrorFormat(symbol)
End If
Return symbol
End Function
End Class
End Namespace
......@@ -50,7 +50,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Dim containingAssembly As AssemblySymbol = Me.ContainingAssembly
If containingAssembly.IsMissing Then
Return ErrorFactory.ErrorInfo(ERRID.ERR_UnreferencedAssembly3, containingAssembly.Identity, CustomSymbolDisplayFormatter.DefaultErrorFormatIfSpecialType(Me))
Dim arg = If(Me.SpecialType <> SpecialType.None, DirectCast(CustomSymbolDisplayFormatter.DefaultErrorFormat(Me), Object), Me)
Return ErrorFactory.ErrorInfo(ERRID.ERR_UnreferencedAssembly3, containingAssembly.Identity, arg)
Else
Dim containingModule As ModuleSymbol = Me.ContainingModule
......
......@@ -1548,5 +1548,100 @@ End Class
Diagnostic(NullOperationSyntaxTestAnalyzer.ParamsArrayOperationDescriptor.Id, "New Integer() { 1 }").WithLocation(10, 12),
Diagnostic(NullOperationSyntaxTestAnalyzer.ParamsArrayOperationDescriptor.Id, "New Integer() { 1, 2 }").WithLocation(11, 12))
End Sub
<WorkItem(8114, "https://github.com/dotnet/roslyn/issues/8114")>
<Fact>
Public Sub InvalidOperatorVisualBasic()
Dim source = <compilation>
<file name="c.vb">
<![CDATA[
Class C
Public Function M1(a As Double, b as C) as Double
Return b + c
End Sub
Public Function M2(s As C) As C
Return -s
End Function
End Class
]]>
</file>
</compilation>
Dim comp = CompilationUtils.CreateCompilationWithMscorlibAndVBRuntime(source)
comp.VerifyDiagnostics(
Diagnostic(ERRID.ERR_EndFunctionExpected, "Public Function M1(a As Double, b as C) as Double").WithLocation(2, 5),
Diagnostic(ERRID.ERR_InvalidEndSub, "End Sub").WithLocation(4, 5),
Diagnostic(ERRID.ERR_InvInsideEndsProc, "Public Function M2(s As C) As C").WithLocation(6, 5),
Diagnostic(ERRID.ERR_ClassNotExpression1, "c").WithArguments("C").WithLocation(3, 20),
Diagnostic(ERRID.ERR_UnaryOperand2, "-s").WithArguments("-", "C").WithLocation(7, 16))
comp.VerifyAnalyzerDiagnostics({New InvalidOperatorExpressionTestAnalyzer}, Nothing, Nothing, False,
Diagnostic(InvalidOperatorExpressionTestAnalyzer.InvalidBinaryDescriptor.Id, "b + c").WithLocation(3, 16),
Diagnostic(InvalidOperatorExpressionTestAnalyzer.InvalidUnaryDescriptor.Id, "-s").WithLocation(7, 16))
End Sub
<Fact>
Public Sub ConditionalAccessOperationsVisualBasic()
Dim source = <compilation>
<file name="c.vb">
<![CDATA[
Class C
Public Property Prop As Integer
Get
Return 0
End Get
Set
End Set
End Property
Public Field As Integer
Default Public Property Mumble(i As Integer)
Get
return Field
End Get
Set
Field = Value
End Set
End Property
Public Field1 As C = Nothing
Public Sub M0(p As C)
Dim x = p?.Prop
x = p?.Field
x = p?(0)
p?.M0(Nothing)
x = Field1?.Prop
x = Field1?.Field
x = Field1?(0)
Field1?.M0(Nothing)
End Sub
End Class
]]>
</file>
</compilation>
Dim comp = CompilationUtils.CreateCompilationWithMscorlibAndVBRuntime(source)
comp.VerifyDiagnostics()
comp.VerifyAnalyzerDiagnostics({New ConditionalAccessOperationTestAnalyzer}, Nothing, Nothing, False,
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?.Prop").WithLocation(24, 17),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p?.Prop").WithLocation(24, 17),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?.Field").WithLocation(25, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p?.Field").WithLocation(25, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?(0)").WithLocation(26, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p?(0)").WithLocation(26, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "p?.M0(Nothing)").WithLocation(27, 9),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "p?.M0(Nothing)").WithLocation(27, 9),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?.Prop").WithLocation(29, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1?.Prop").WithLocation(29, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?.Field").WithLocation(30, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1?.Field").WithLocation(30, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?(0)").WithLocation(31, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1?(0)").WithLocation(31, 13),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessOperationDescriptor.Id, "Field1?.M0(Nothing)").WithLocation(32, 9),
Diagnostic(ConditionalAccessOperationTestAnalyzer.ConditionalAccessInstanceOperationDescriptor.Id, "Field1?.M0(Nothing)").WithLocation(32, 9))
End Sub
End Class
End Namespace
......@@ -14,8 +14,6 @@
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.Editor</RootNamespace>
<AssemblyName>Microsoft.CodeAnalysis.EditorFeatures</AssemblyName>
<!-- Disable the architecture mismatch warning -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<CopyNuGetImplementations>false</CopyNuGetImplementations>
</PropertyGroup>
......@@ -820,4 +818,4 @@
<ImportGroup Label="Targets">
<Import Project="..\..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
......@@ -10,8 +10,6 @@
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.Text</RootNamespace>
<AssemblyName>Microsoft.CodeAnalysis.EditorFeatures.Text</AssemblyName>
<!-- Disable the architecture mismatch warning -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<CopyNuGetImplementations>false</CopyNuGetImplementations>
</PropertyGroup>
......
......@@ -19,40 +19,8 @@ internal AssemblyReference(AssemblyIdentity identity)
_identity = identity;
}
AssemblyContentType IAssemblyReference.ContentType
{
get { return _identity.ContentType; }
}
string IAssemblyReference.Culture
{
get { return _identity.CultureName; }
}
bool IAssemblyReference.IsRetargetable
{
get { return _identity.IsRetargetable; }
}
string INamedEntity.Name
{
get { return _identity.Name; }
}
ImmutableArray<byte> IAssemblyReference.PublicKeyToken
{
get { return _identity.PublicKeyToken; }
}
Version IAssemblyReference.Version
{
get { return _identity.Version; }
}
string IAssemblyReference.GetDisplayName()
{
return _identity.GetDisplayName();
}
AssemblyIdentity IAssemblyReference.Identity => _identity;
string INamedEntity.Name => _identity.Name;
IAssemblyReference IModuleReference.GetContainingAssembly(EmitContext context)
{
......
......@@ -84,14 +84,7 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
if (allSymbolReferences.Count == 0)
{
// No exact matches found. Fall back to fuzzy searching.
// Only bother doing this for host workspaces. We don't want this for
// things like the Interactive workspace as this will cause us to
// create expensive bktrees which we won't even be able to save for
// future use.
if (document.Project.Solution.Workspace.Kind == WorkspaceKind.Host)
{
await FindResults(projectToAssembly, referenceToCompilation, project, allSymbolReferences, finder, exact: false, cancellationToken: cancellationToken).ConfigureAwait(false);
}
await FindResults(projectToAssembly, referenceToCompilation, project, allSymbolReferences, finder, exact: false, cancellationToken: cancellationToken).ConfigureAwait(false);
}
// Nothing found at all. No need to proceed.
......
......@@ -10,8 +10,6 @@
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.Editor</RootNamespace>
<AssemblyName>Microsoft.CodeAnalysis.InteractiveEditorFeatures</AssemblyName>
<!-- Disable the architecture mismatch warning -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<CopyNuGetImplementations>false</CopyNuGetImplementations>
</PropertyGroup>
......@@ -168,4 +166,4 @@
<ImportGroup Label="Targets">
<Import Project="..\..\..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
......@@ -16,7 +16,7 @@ public BrowseObject(AnalyzerItem analyzerItem)
_analyzerItem = analyzerItem;
}
[DisplayName("(Name)")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.AnalyzerItemNameDisplayName))]
public string Name
{
get
......@@ -25,7 +25,7 @@ public string Name
}
}
[DisplayName("Path")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.AnalyzerItemPathDisplayName))]
public string Path
{
get
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.VisualStudio.LanguageServices.SolutionExplorer;
using System;
using System.ComponentModel;
using System.Globalization;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.SolutionExplorer
{
/// <summary>
/// The attribute used for adding localized display names to properties
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
internal sealed class BrowseObjectDisplayNameAttribute : DisplayNameAttribute
{
private string m_key;
private bool m_initialized;
public BrowseObjectDisplayNameAttribute(string key)
{
m_key = key;
}
public override string DisplayName
{
get
{
if (!m_initialized)
{
base.DisplayNameValue = SolutionExplorerShim.ResourceManager.GetString(m_key, CultureInfo.CurrentUICulture);
m_initialized = true;
}
return base.DisplayName;
}
}
}
}
......@@ -20,7 +20,7 @@ public BrowseObject(DiagnosticItem diagnosticItem)
_diagnosticItem = diagnosticItem;
}
[DisplayName("ID")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemIDDisplayName))]
public string Id
{
get
......@@ -29,7 +29,7 @@ public string Id
}
}
[DisplayName("Title")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemTitleDisplayName))]
public string Title
{
get
......@@ -38,7 +38,7 @@ public string Title
}
}
[DisplayName("Description")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemDescriptionDisplayName))]
public string Description
{
get
......@@ -47,7 +47,7 @@ public string Description
}
}
[DisplayName("Help link")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemHelpLinkDisplayName))]
public string HelpLink
{
get
......@@ -56,7 +56,7 @@ public string HelpLink
}
}
[DisplayName("Category")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemCategoryDisplayName))]
public string Category
{
get
......@@ -65,7 +65,7 @@ public string Category
}
}
[DisplayName("Default severity")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemDefaultSeverityDisplayName))]
public string DefaultSeverity
{
get
......@@ -74,7 +74,7 @@ public string DefaultSeverity
}
}
[DisplayName("Enabled by default")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemEnabledByDefaultDisplayName))]
public bool EnabledByDefault
{
get
......@@ -83,7 +83,7 @@ public bool EnabledByDefault
}
}
[DisplayName("Message")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemMessageDisplayName))]
public string Message
{
get
......@@ -92,7 +92,7 @@ public string Message
}
}
[DisplayName("Tags")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemTagsDisplayName))]
public string Tags
{
get
......@@ -101,7 +101,7 @@ public string Tags
}
}
[DisplayName("Effective severity")]
[BrowseObjectDisplayName(nameof(SolutionExplorerShim.DiagnosticItemEffectiveSeverityDisplayName))]
public string EffectiveSeverity
{
get
......
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.0
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
......@@ -87,6 +87,24 @@ internal class SolutionExplorerShim {
}
}
/// <summary>
/// Looks up a localized string similar to (Name).
/// </summary>
internal static string AnalyzerItemNameDisplayName {
get {
return ResourceManager.GetString("AnalyzerItemNameDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Path.
/// </summary>
internal static string AnalyzerItemPathDisplayName {
get {
return ResourceManager.GetString("AnalyzerItemPathDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Checking out {0} for editing....
/// </summary>
......@@ -177,6 +195,96 @@ internal class SolutionExplorerShim {
}
}
/// <summary>
/// Looks up a localized string similar to Category.
/// </summary>
internal static string DiagnosticItemCategoryDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemCategoryDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Default severity.
/// </summary>
internal static string DiagnosticItemDefaultSeverityDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemDefaultSeverityDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Description.
/// </summary>
internal static string DiagnosticItemDescriptionDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemDescriptionDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Effective severity.
/// </summary>
internal static string DiagnosticItemEffectiveSeverityDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemEffectiveSeverityDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enabled by default.
/// </summary>
internal static string DiagnosticItemEnabledByDefaultDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemEnabledByDefaultDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Help link.
/// </summary>
internal static string DiagnosticItemHelpLinkDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemHelpLinkDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ID.
/// </summary>
internal static string DiagnosticItemIDDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemIDDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Message.
/// </summary>
internal static string DiagnosticItemMessageDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemMessageDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Tags.
/// </summary>
internal static string DiagnosticItemTagsDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemTagsDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Title.
/// </summary>
internal static string DiagnosticItemTitleDisplayName {
get {
return ResourceManager.GetString("DiagnosticItemTitleDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Default.
/// </summary>
......
......@@ -112,6 +112,7 @@
<Compile Include="AnalyzersFolderItem\AnalyzersFolderItemSource.cs" />
<Compile Include="AnalyzersFolderItem\AnalyzersFolderItemProvider.cs" />
<Compile Include="BaseItem.cs" />
<Compile Include="BrowseObjectAttributes.cs" />
<Compile Include="DiagnosticItem\DiagnosticItem.BrowseObject.cs" />
<Compile Include="DiagnosticItem\DiagnosticItemProvider.cs" />
<Compile Include="AnalyzerReferenceManager.cs" />
......
......@@ -174,4 +174,40 @@
<data name="AnalyzersCommandHandler_CheckingOutRuleSet" xml:space="preserve">
<value>Checking out {0} for editing...</value>
</data>
<data name="AnalyzerItemNameDisplayName" xml:space="preserve">
<value>(Name)</value>
</data>
<data name="AnalyzerItemPathDisplayName" xml:space="preserve">
<value>Path</value>
</data>
<data name="DiagnosticItemCategoryDisplayName" xml:space="preserve">
<value>Category</value>
</data>
<data name="DiagnosticItemDefaultSeverityDisplayName" xml:space="preserve">
<value>Default severity</value>
</data>
<data name="DiagnosticItemDescriptionDisplayName" xml:space="preserve">
<value>Description</value>
</data>
<data name="DiagnosticItemEffectiveSeverityDisplayName" xml:space="preserve">
<value>Effective severity</value>
</data>
<data name="DiagnosticItemEnabledByDefaultDisplayName" xml:space="preserve">
<value>Enabled by default</value>
</data>
<data name="DiagnosticItemHelpLinkDisplayName" xml:space="preserve">
<value>Help link</value>
</data>
<data name="DiagnosticItemIDDisplayName" xml:space="preserve">
<value>ID</value>
</data>
<data name="DiagnosticItemMessageDisplayName" xml:space="preserve">
<value>Message</value>
</data>
<data name="DiagnosticItemTagsDisplayName" xml:space="preserve">
<value>Tags</value>
</data>
<data name="DiagnosticItemTitleDisplayName" xml:space="preserve">
<value>Title</value>
</data>
</root>
\ No newline at end of file
......@@ -25,7 +25,7 @@ internal partial class SymbolTreeInfo
/// <summary>
/// The spell checker we use for fuzzy match queries.
/// </summary>
private readonly Lazy<SpellChecker> _lazySpellChecker;
private readonly SpellChecker _spellChecker;
private static readonly StringComparer s_caseInsensitiveComparer = CaseInsensitiveComparison.Comparer;
......@@ -45,25 +45,11 @@ internal partial class SymbolTreeInfo
: StringComparer.Ordinal.Compare(s1, s2);
};
private SymbolTreeInfo(VersionStamp version, IReadOnlyList<Node> orderedNodes)
: this(version, orderedNodes, new Lazy<SpellChecker>(() => new SpellChecker(orderedNodes.Select(n => n.Name))))
{
}
private SymbolTreeInfo(VersionStamp version, IReadOnlyList<Node> orderedNodes, SpellChecker spellChecker)
: this(version, orderedNodes, new Lazy<SpellChecker>(() => spellChecker))
{
// Make the lazy 'Created'. This is a no-op since we already have the underlying spell
// checker. This way if we end up wanting to serialize this tree info, we'll also
// serialize the spell checker.
var unused = _lazySpellChecker.Value;
}
private SymbolTreeInfo(VersionStamp version, IReadOnlyList<Node> orderedNodes, Lazy<SpellChecker> lazySpellChecker)
{
_version = version;
_nodes = orderedNodes;
_lazySpellChecker = lazySpellChecker;
_spellChecker = spellChecker;
}
public int Count => _nodes.Count;
......@@ -98,7 +84,7 @@ public Task<IEnumerable<ISymbol>> FindAsync(SearchQuery query, AsyncLazy<IAssemb
/// </summary>
public async Task<IEnumerable<ISymbol>> FuzzyFindAsync(AsyncLazy<IAssemblySymbol> lazyAssembly, string name, CancellationToken cancellationToken)
{
var similarNames = _lazySpellChecker.Value.FindSimilarWords(name);
var similarNames = _spellChecker.FindSimilarWords(name);
var result = new List<ISymbol>();
foreach (var similarName in similarNames)
......@@ -305,7 +291,8 @@ internal static SymbolTreeInfo Create(VersionStamp version, IAssemblySymbol asse
var list = new List<Node>();
GenerateNodes(assembly.GlobalNamespace, list);
return new SymbolTreeInfo(version, SortNodes(list));
var spellChecker = new SpellChecker(list.Select(n => n.Name));
return new SymbolTreeInfo(version, SortNodes(list), spellChecker);
}
private static Node[] SortNodes(List<Node> nodes)
......
......@@ -13,7 +13,7 @@ namespace Microsoft.CodeAnalysis.FindSymbols
internal partial class SymbolTreeInfo : IObjectWritable
{
private const string PrefixMetadataSymbolTreeInfo = "<MetadataSymbolTreeInfoPersistence>_";
private const string SerializationFormat = "10";
private const string SerializationFormat = "9";
private static bool ShouldCreateFromScratch(
Solution solution,
......@@ -123,15 +123,7 @@ public void WriteTo(ObjectWriter writer)
writer.WriteInt32(node.ParentIndex);
}
if (_lazySpellChecker.IsValueCreated)
{
writer.WriteBoolean(true);
_lazySpellChecker.Value.WriteTo(writer);
}
else
{
writer.WriteBoolean(false);
}
_spellChecker.WriteTo(writer);
}
internal static SymbolTreeInfo ReadFrom(ObjectReader reader)
......@@ -149,7 +141,7 @@ internal static SymbolTreeInfo ReadFrom(ObjectReader reader)
var count = reader.ReadInt32();
if (count == 0)
{
return new SymbolTreeInfo(version, ImmutableArray<Node>.Empty);
return new SymbolTreeInfo(version, ImmutableArray<Node>.Empty, SpellChecker.Empty);
}
var nodes = new Node[count];
......@@ -161,10 +153,7 @@ internal static SymbolTreeInfo ReadFrom(ObjectReader reader)
nodes[i] = new Node(name, parentIndex);
}
var hasSpellChecker = reader.ReadBoolean();
return hasSpellChecker
? new SymbolTreeInfo(version, nodes, SpellChecker.ReadFrom(reader))
: new SymbolTreeInfo(version, nodes);
return new SymbolTreeInfo(version, nodes, SpellChecker.ReadFrom(reader));
}
catch (Exception)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册