Skip to content

Commit

Permalink
Add case
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Jan 28, 2022
1 parent 7a4d962 commit f4e0d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CSharp/CSharp/CSharpTypeAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ public static bool IsExplicitThatCanBeImplicit(
case SyntaxKind.SwitchExpressionArm:
case SyntaxKind.YieldReturnStatement:
case SyntaxKind.ConditionalExpression:
case SyntaxKind.ComplexElementInitializerExpression:
{
SyntaxDebug.Assert(tupleExpression.ContainsDiagnostics || !tupleExpression.Arguments.Any(f => f.Expression.IsKind(SyntaxKind.DeclarationExpression)), tupleExpression);
return false;
Expand Down
1 change: 1 addition & 0 deletions src/CSharp/CSharp/Extensions/SyntaxExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3222,6 +3222,7 @@ public static bool IsInExpressionTree(
case SyntaxKind.YieldReturnStatement:
case SyntaxKind.IfDirectiveTrivia:
case SyntaxKind.ElifDirectiveTrivia:
case SyntaxKind.WhenClause:
{
return false;
}
Expand Down

0 comments on commit f4e0d53

Please sign in to comment.