Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main to release/dev17.3 #59878

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ public CSharpOperationFactory(SemanticModel semanticModel)
case BoundKind.TupleLiteral:
case BoundKind.ConvertedTupleLiteral:
return CreateBoundTupleOperation((BoundTupleExpression)boundNode);
case BoundKind.UnconvertedInterpolatedString:
throw ExceptionUtilities.Unreachable;
case BoundKind.InterpolatedString:
return CreateBoundInterpolatedStringExpressionOperation((BoundInterpolatedString)boundNode);
case BoundKind.StringInsert:
Expand All @@ -218,8 +216,6 @@ public CSharpOperationFactory(SemanticModel semanticModel)
return CreateBoundLocalFunctionStatementOperation((BoundLocalFunctionStatement)boundNode);
case BoundKind.AnonymousObjectCreationExpression:
return CreateBoundAnonymousObjectCreationExpressionOperation((BoundAnonymousObjectCreationExpression)boundNode);
case BoundKind.AnonymousPropertyDeclaration:
throw ExceptionUtilities.Unreachable;
case BoundKind.ConstantPattern:
return CreateBoundConstantPatternOperation((BoundConstantPattern)boundNode);
case BoundKind.DeclarationPattern:
Expand Down Expand Up @@ -268,10 +264,6 @@ public CSharpOperationFactory(SemanticModel semanticModel)
return CreateRangeExpressionOperation((BoundRangeExpression)boundNode);
case BoundKind.SwitchSection:
return CreateBoundSwitchSectionOperation((BoundSwitchSection)boundNode);
case BoundKind.UnconvertedConditionalOperator:
throw ExceptionUtilities.Unreachable;
case BoundKind.UnconvertedSwitchExpression:
throw ExceptionUtilities.Unreachable;
case BoundKind.ConvertedSwitchExpression:
return CreateBoundSwitchExpressionOperation((BoundConvertedSwitchExpression)boundNode);
case BoundKind.SwitchExpressionArm:
Expand Down Expand Up @@ -326,6 +318,10 @@ public CSharpOperationFactory(SemanticModel semanticModel)
_ => null
};
return new NoneOperation(children, _semanticModel, boundNode.Syntax, type: type, constantValue, isImplicit: isImplicit);
case BoundKind.UnconvertedInterpolatedString:
case BoundKind.UnconvertedConditionalOperator:
case BoundKind.UnconvertedSwitchExpression:
case BoundKind.AnonymousPropertyDeclaration:
default:
// If you're hitting this because the IOperation test hook has failed, see
// <roslyn-root>/docs/Compilers/IOperation Test Hook.md for instructions on how to fix.
Expand Down Expand Up @@ -849,7 +845,7 @@ private IOperation CreateBoundObjectInitializerMemberOperation(BoundObjectInitia

return new PropertyReferenceOperation(property.GetPublicSymbol(), arguments, createReceiver(), _semanticModel, syntax, type, isImplicit);
default:
throw ExceptionUtilities.Unreachable;
throw ExceptionUtilities.UnexpectedValue(memberSymbol.Kind);
}

IOperation? createReceiver() => memberSymbol?.IsStatic == true ?
Expand Down