Skip to content

Idempotency problem when adding members to a single case union without a pipe #3102

@joprice

Description

@joprice

Issue created from fantomas-online

Formatted code

module Test


type X = X
    with

        // a newline is added boave this line on each frmat if the union does not begin with a pipe
        static member x = 1

type Y =
    | Y

    static member x = 1

Reformatted code

module Test


type X = X
    with


        // a newline is added boave this line on each frmat if the union does not begin with a pipe
        static member x = 1

type Y =
    | Y

    static member x = 1

Problem description

Fantomas was not able to produce the same code after reformatting the result.

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions