Skip to content

Commit

Permalink
fix: method parameters aren't escaped if they are keywords (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored Jun 14, 2019
1 parent f668749 commit eb3529a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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())))));
}

Expand Down

0 comments on commit eb3529a

Please sign in to comment.