Skip to content

ifdef removed when used on inline keyword in function #2017

@TheAngryByrd

Description

@TheAngryByrd

Issue created from fantomas-online

Code

    let 
#if !DEBUG
        inline
#endif
        map f ar = Async.map (Result.map f) ar

Result

let inline map f ar = Async.map (Result.map f) ar

Problem description

I'm adding AltCover to FsToolkit.ErrorHandling, however there is a known issue with regards to inline keyword and getting correct code coverage. So the suggest fix is to add an ifdef around the inline keyword. However, when running code formatting Fantomas removes the change.

Yes, I hate this workaround for coverage as much as you probably do.

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 4.6 branch at 1/1/1990

Default Fantomas configuration

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

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