Skip to content

Commit

Permalink
Assert syntax kind on calls
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkiGibson committed Jun 5, 2023
1 parent 234000b commit 61703e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Compilers/CSharp/Portable/BoundTree/BoundExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ public Location? InterceptableLocation
{
get
{
Debug.Assert(this.Syntax is InvocationExpressionSyntax, $"Syntax.Kind is {this.Syntax.Kind()}");

if (this.WasCompilerGenerated || this.Syntax is not InvocationExpressionSyntax syntax)
{
return null;
Expand Down

0 comments on commit 61703e9

Please sign in to comment.