Skip to content

Commit

Permalink
Fixing edge case for open generics
Browse files Browse the repository at this point in the history
closes #832
  • Loading branch information
belav committed Feb 20, 2023
1 parent 7210917 commit 4ec90be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
typeof(AnExceptionallyLongAndElaborateClassNameToMakeAnExampleRegardingOpenGenerics<,>).MakeGenericType(
typeof(string),
typeof(int)
);
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ internal static class TypeArgumentList
public static Doc Print(TypeArgumentListSyntax node, FormattingContext context)
{
Doc separator =
node.Arguments.Count > 1 || node.Arguments.Any(o => o is GenericNameSyntax)
node.Arguments.FirstOrDefault() is not OmittedTypeArgumentSyntax
&& (node.Arguments.Count > 1 || node.Arguments.Any(o => o is GenericNameSyntax))
? Doc.SoftLine
: Doc.Null;

Expand Down

0 comments on commit 4ec90be

Please sign in to comment.