You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varsymbol=context.Operationswitch{
_ =>thrownewInvalidOperationException("Unexpected operation kind: "+context.Operation.Kind),};// which is currentlyvarsymbol=context.Operationswitch{
_
=>thrownewInvalidOperationException("Unexpected operation kind: "+context.Operation.Kind),};
The Expression breaks, but the first line of it fits onto the same line as the _ =>
The quick version of this was to add this to SwitchExpression, but that ruined a number of other edge cases.
SeparatedSyntaxList.Print(node.Arms,
o =>Doc.Group(Node.Print(o.Pattern),o.WhenClause!=null?Doc.Concat(" ",Node.Print(o.WhenClause)):Doc.Null,Doc.ConditionalGroup(Doc.Concat(" ",Token.PrintWithSuffix(o.EqualsGreaterThanToken," "),Node.Print(o.Expression)),// use align 2 here to make sure that the => never lines up with statements above it// it makes this more readable for big ugly switch expressionsDoc.Align(2,Doc.Concat(Doc.Line,Token.PrintWithSuffix(o.EqualsGreaterThanToken," "),Node.Print(o.Expression))))),Doc.HardLine)
Ideally we would format the following
The
Expression
breaks, but the first line of it fits onto the same line as the_ =>
The quick version of this was to add this to
SwitchExpression
, but that ruined a number of other edge cases.This could be re-evaluated after we handle #7
The text was updated successfully, but these errors were encountered: