diff --git a/src/Pharmacist.Core/Generation/RoslynGeneratorExtensions.cs b/src/Pharmacist.Core/Generation/RoslynGeneratorExtensions.cs index c5a0b80..df4be46 100644 --- a/src/Pharmacist.Core/Generation/RoslynGeneratorExtensions.cs +++ b/src/Pharmacist.Core/Generation/RoslynGeneratorExtensions.cs @@ -112,7 +112,7 @@ public static ParameterListSyntax GenerateMethodParameters(this IMethod method) return SyntaxFactory.ParameterList( SyntaxFactory.SeparatedList( method.Parameters.Select( - x => SyntaxFactory.Parameter(SyntaxFactory.Identifier(x.Name)) + x => SyntaxFactory.Parameter(SyntaxFactory.Identifier(x.Name.GetKeywordSafeName())) .WithType(SyntaxFactory.IdentifierName(x.Type.GenerateFullGenericName()))))); }