Skip to content

Commit

Permalink
Update ShimLayer: sync with Roslyn's Syntax.xml fix (#8210)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource authored Oct 17, 2023
1 parent 06d23aa commit 2af49af
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ static TypeDeclarationExtensions()
// In earlier versions, the ParameterList was only available on the derived RecordDeclarationSyntax (starting from version 3.7)
// To work with version 3.7 to version 4.6 we need to special case the record declaration and access
// the parameter list from the derived RecordDeclarationSyntax.
if (SyntaxWrapperHelper.GetWrappedType(typeof(RecordDeclarationSyntaxWrapper)) is { } recordDeclaration)
{
RecordDeclarationParameterListAccessor = LightupHelpers.CreateSyntaxPropertyAccessor<TypeDeclarationSyntax, ParameterListSyntax>(recordDeclaration, nameof(ParameterList));
}
var recordDeclaration = SyntaxWrapperHelper.GetWrappedType(typeof(RecordDeclarationSyntaxWrapper));
RecordDeclarationParameterListAccessor = LightupHelpers.CreateSyntaxPropertyAccessor<TypeDeclarationSyntax, ParameterListSyntax>(recordDeclaration, nameof(ParameterList));
}

public static ParameterListSyntax ParameterList(this TypeDeclarationSyntax syntax) =>
Expand Down

0 comments on commit 2af49af

Please sign in to comment.