Skip to content

Commit

Permalink
Update BuildApiTest.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Nov 7, 2024
1 parent 3cfba6b commit 86028d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ApiBuilderTests/BuildApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,13 @@ static string BuildKey(MethodDeclarationSyntax method)

static string BuildTypeArgs(MethodDeclarationSyntax method)
{
if (method.TypeParameterList == null || method.TypeParameterList.Parameters.Count == 0)
var types = method.TypeParameterList;
if (types == null || types.Parameters.Count == 0)
{
return string.Empty;
}

return $"<{string.Join(", ", method.TypeParameterList.Parameters.Select(_ => _.Identifier.Text))}>";
return $"<{string.Join(", ", types.Parameters.Select(_ => _.Identifier.Text))}>";
}

static string BuildParameters(MethodDeclarationSyntax method)
Expand Down

0 comments on commit 86028d5

Please sign in to comment.