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

Comment no longer attached to autoproperty #2948

Closed
4 tasks
nojaf opened this issue Aug 22, 2023 · 1 comment
Closed
4 tasks

Comment no longer attached to autoproperty #2948

nojaf opened this issue Aug 22, 2023 · 1 comment

Comments

@nojaf
Copy link
Contributor

nojaf commented Aug 22, 2023

Issue created from fantomas-online

Code

module A

type X() =
    member val Y: int = 7 
            // some comment
            with get,set

Result

module A

type X() =
    member val Y: int = 7 with get, set
// some comment

Problem description

The range of the AutoProperty doesn't include the with get,set, resulting in the comment jumping around.
Related to dotnet/fsharp#15835

Extra information

  • The formatted result breaks my code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.
  • I would like a release if this problem is solved.

Options

Fantomas main branch at 2023-08-21T13:40:39Z - a0abc97

Default Fantomas configuration

Did you know that you can ignore files when formatting by using a .fantomasignore file?
PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.

@nojaf
Copy link
Contributor Author

nojaf commented Aug 28, 2023

Fixed in #2920

@nojaf nojaf closed this as completed Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant