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

Fantomas chops of members #239

Closed
Karamell opened this issue May 4, 2018 · 2 comments
Closed

Fantomas chops of members #239

Karamell opened this issue May 4, 2018 · 2 comments

Comments

@Karamell
Copy link

Karamell commented May 4, 2018

I run dotnet fantomas file.fs on the following content:

namespace A
type K () =
    inherit D<S> () with
    let Hello = "Where did I go?"  
    member x.Where() = "is my members?"

..and get

namespace A

type K() =
    inherit D<S>()

Why is Hello and Where gone?

jindraivanek added a commit to jindraivanek/fantomas that referenced this issue May 6, 2018
@jindraivanek jindraivanek mentioned this issue May 6, 2018
@jindraivanek
Copy link
Contributor

Another wrong cases:

type T1 = { x: int} with
    member __.X = ()

type T2 = T2 with
   member __.X = ()

output

type T1 =
    { x : int }
    member __.X = ()

type T2 = T2

@jindraivanek
Copy link
Contributor

After some digging, first case is correct because

type T1 = 
    { x: int} 
    with
        member __.X = ()

is the same as

type T1 = 
    { x: int}
    member __.X = ()

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

No branches or pull requests

2 participants