Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkiGibson committed Jun 5, 2023
1 parent 61703e9 commit c431edb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Compilers/CSharp/Portable/BoundTree/BoundExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,15 @@ public Location? InterceptableLocation
{
get
{
Debug.Assert(this.Syntax is InvocationExpressionSyntax, $"Syntax.Kind is {this.Syntax.Kind()}");
Debug.Assert(this.Syntax is InvocationExpressionSyntax
// Constructor initializer
|| this is
{
WasCompilerGenerated: true,
Method.MethodKind: MethodKind.Constructor,
Syntax: TypeDeclarationSyntax or ConstructorDeclarationSyntax
},
$"Syntax.Kind is {this.Syntax.Kind()}");

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

0 comments on commit c431edb

Please sign in to comment.