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

Errors after formatting secondary constructors #423

Closed
auduchinok opened this issue Feb 27, 2019 · 2 comments
Closed

Errors after formatting secondary constructors #423

auduchinok opened this issue Feb 27, 2019 · 2 comments

Comments

@auduchinok
Copy link
Contributor

auduchinok commented Feb 27, 2019

Issue created from fantomas-ui

Reproduced on ProjectProperties.fs.

Code

type FSharpProjectProperties =
    inherit ProjectPropertiesBase<ManagedProjectConfiguration>

    val mutable targetPlatformData: TargetPlatformData
    val buildSettings: FSharpBuildSettings

    new(projectTypeGuids: ICollection<_>, factoryGuid, targetFrameworkIds, targetPlatformData, dotNetCoreSDK) =
        { inherit ProjectPropertiesBase<_>(projectTypeGuids, factoryGuid, targetFrameworkIds, dotNetCoreSDK)
          buildSettings = FSharpBuildSettings()
          targetPlatformData = targetPlatformData }

    new(factoryGuid, [<Optional; DefaultParameterValue(null: TargetPlatformData)>] targetPlatformData) =
        { inherit ProjectPropertiesBase<_>(factoryGuid)
          buildSettings = FSharpBuildSettings()
          targetPlatformData = targetPlatformData }

Result

type FSharpProjectProperties =
    inherit ProjectPropertiesBase<ManagedProjectConfiguration>
    val mutable targetPlatformData : TargetPlatformData
    val buildSettings : FSharpBuildSettings

    new(projectTypeGuids : ICollection<_>, factoryGuid, targetFrameworkIds,
        targetPlatformData, dotNetCoreSDK) =
        { inherit ProjectPropertiesBase<_>(projectTypeGuids, factoryGuid,
                                           targetFrameworkIds, dotNetCoreSDK); buildSettings =
                                                                                   FSharpBuildSettings
                                                                                       ()
                                                                               targetPlatformData =
                                                                                   targetPlatformData }

    new(factoryGuid,
        [<Optional; DefaultParameterValue(null : TargetPlatformData)>] targetPlatformData) =
        { inherit ProjectPropertiesBase<_>(factoryGuid); buildSettings =
                                                             FSharpBuildSettings
                                                                 ()
                                                         targetPlatformData =
                                                             targetPlatformData }

Options

Fantomas 2.9.2

Name Value
IndentSpaceNum 4
PageWidth 80
PreserveEndOfLine false
SemicolonAtEndOfLine false
SpaceBeforeArgument true
SpaceBeforeColon true
SpaceAfterComma true
SpaceAfterSemicolon true
IndentOnTryWith false
ReorderOpenDeclaration false
SpaceAroundDelimiter true
StrictMode false
@auduchinok auduchinok changed the title Errors after formatting for secondary constructors Errors after formatting secondary constructors Feb 27, 2019
@jindraivanek
Copy link
Contributor

Unless I missing something, this is already fixed by #414. (not released)

Check out preview version of fantomas-ui here

@auduchinok
Copy link
Contributor Author

@jindraivanek Yes, it's indeed fixed in the preview. I should bookmark preview instead and check it there next time.
Thanks!

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