Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downcast operator doesn't get a new line #1203

Closed
3 tasks
Smaug123 opened this issue Oct 26, 2020 · 1 comment · Fixed by #1210
Closed
3 tasks

Downcast operator doesn't get a new line #1203

Smaug123 opened this issue Oct 26, 2020 · 1 comment · Fixed by #1210

Comments

@Smaug123
Copy link
Contributor

Issue created from fantomas-online

Code

longMethodName
    longArgument
    longArgument2
:?> List<bool>

Result

longMethodName
    longArgument
    longArgument2 :?> List<bool>

Problem description

Note that here I've collapsed the line length to something ridiculously small, so that my code sample would hit the line length limit. In our own code, we have a sensible line length and just some rather long lines.

The formatting we would prefer (analogously to how |> works) is:

longMethodName
    longArgument
    longArgument2
:?> List<bool>

This is question 1 from issue #1189.

If you'd like us to enter this into the GR style guidelines, let me know and I'll do that. I think this :?> placement seems pretty uncontroversial.

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas Master at 10/23/2020 14:47:21 - cda111e

    { config with
                MaxLineLength = 30
                SpaceBeforeUppercaseInvocation = true
                SpaceBeforeColon = true
                SpaceBeforeSemicolon = true
                AlignFunctionSignatureToIndentation = true
                AlternativeLongMemberDefinitions = true
                DisableElmishSyntax = true }
@nojaf
Copy link
Contributor

nojaf commented Oct 26, 2020

I think we can indeed identify this a stylistic bug, SynExpr.Downcast is now handled in a weird way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants