Skip to content

Moves type name around when writing constrained type defintions  #1018

Closed
@vsinha

Description

Issue created from fantomas-online

Code

type 'a t when 'a :> IDisposable = T of 'a option

Error

Fantomas was able to format the code but the result appears to be invalid F# code.
Please open an issue.

Formatted result:

type 'a when 'a :> IDisposable t = T of 'a option

Problem description

The t moves to after the IDisposable, which leaves us with invalid F# code. The pre-formatted code builds successfully.

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 08/17/2020 12:26:15 - ab5e8da

Default Fantomas configuration

Activity

added a commit that references this issue on Aug 21, 2020
6188d1e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Participants

    @vsinha

    Issue actions

      Moves type name around when writing constrained type defintions · Issue #1018 · fsprojects/fantomas