Skip to content

Commit

Permalink
Get rid of extra space for omitted types (#466)
Browse files Browse the repository at this point in the history
closes #463

Co-authored-by: Lasath Fernando <[email protected]>
  • Loading branch information
belav and shocklateboy92 authored Oct 26, 2021
1 parent 040b66b commit d3a1a0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public class ClassName
bool
> SomeFieldFuncWithALongName = (someValue_____________________________) =>
SometimesBreaksThisWay(someValue, SomeOtherLongValue);

private Type OmittedTypes = typeof(OmittedTypes<,>);
}

struct S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ public static Doc Print(TypeArgumentListSyntax node)
Token.Print(node.LessThanToken),
Doc.Indent(
separator,
SeparatedSyntaxList.Print(node.Arguments, Node.Print, Doc.Line)
SeparatedSyntaxList.Print(
node.Arguments,
Node.Print,
node.Arguments.FirstOrDefault() is OmittedTypeArgumentSyntax
? Doc.Null
: Doc.Line
)
),
separator,
Token.Print(node.GreaterThanToken)
Expand Down

0 comments on commit d3a1a0b

Please sign in to comment.