Skip to content

Commit

Permalink
Generate syntax lists with the correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Apr 19, 2023
1 parent 4208547 commit 9506efd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ private static SyntaxNode GenerateEventImplementation(
SyntaxFactory.List(
new[]
{
generator.WithStatements(generator.GetAccessor(eventDeclaration, DeclarationKind.AddAccessor), defaultMethodBodyStatements),
generator.WithStatements(generator.GetAccessor(eventDeclaration, DeclarationKind.RemoveAccessor), defaultMethodBodyStatements),
(AccessorDeclarationSyntax)generator.WithStatements(generator.GetAccessor(eventDeclaration, DeclarationKind.AddAccessor), defaultMethodBodyStatements),
(AccessorDeclarationSyntax)generator.WithStatements(generator.GetAccessor(eventDeclaration, DeclarationKind.RemoveAccessor), defaultMethodBodyStatements),
})));
}

Expand Down Expand Up @@ -249,7 +249,7 @@ protected override async Task<Document> MakeMemberDeclaredOnImplementationTypeSt
var currentInvocation = (InvocationExpressionSyntax)node;
var newArgList = currentInvocation.ArgumentList.WithArguments(
SyntaxFactory.SingletonSeparatedList(generator.Argument(invocation.target))
SyntaxFactory.SingletonSeparatedList((ArgumentSyntax)generator.Argument(invocation.target))
.AddRange(currentInvocation.ArgumentList.Arguments));
return currentInvocation.WithArgumentList(newArgList).WithExpression(SyntaxFactory.IdentifierName(symbol.Name));
});
Expand Down

0 comments on commit 9506efd

Please sign in to comment.