Skip to content

Commit

Permalink
Merge pull request #59878 from dotnet/merges/main-to-release/dev17.3
Browse files Browse the repository at this point in the history
Merge main to release/dev17.3
  • Loading branch information
dotnet-bot authored Mar 2, 2022
2 parents 8212786 + aaf1726 commit 0890835
Showing 1 changed file with 5 additions and 9 deletions.
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

0 comments on commit 0890835

Please sign in to comment.