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

fsharp_space_before_colon not honored for return type info of explicit get , set #2825

Closed
1 of 3 tasks
dawedawe opened this issue Apr 4, 2023 · 0 comments · Fixed by #2826
Closed
1 of 3 tasks

fsharp_space_before_colon not honored for return type info of explicit get , set #2825

dawedawe opened this issue Apr 4, 2023 · 0 comments · Fixed by #2826

Comments

@dawedawe
Copy link
Member

dawedawe commented Apr 4, 2023

Issue created from fantomas-online

Code

type SomeType() =

    let mutable v: string = ""

    member val SomeAutoProp: float = 23.42 with get, set
    
    member this.MyProperty
        with get (): string = v
        and set (value: string): unit = v <- value

Result

type SomeType() =

    let mutable v : string = ""

    member val SomeAutoProp : float = 23.42 with get, set

    member this.MyProperty
        with get (): string = v
        and set (value : string): unit = v <- value

Problem description

Expected code:

type SomeType() =

    let mutable v : string = ""

    member val SomeAutoProp : float = 23.42 with get, set

    member this.MyProperty
        with get () : string = v
        and set (value : string) : unit = v <- value

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.

Options

Fantomas main branch at 2023-04-03T14:40:17Z - 9298c26

    { config with
                SpaceBeforeColon = true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant