Skip to content

[v8] is deleting a [<return: ...>] attribute #3420

Description

@MangelMaxime

Hello,

When testing Fantomas v8, I discovered an issue with one of my files.

Indeed, Fantomas is deleting one of the line from this code:

namespace Nacara.Plugins.Internal

open System.Runtime.InteropServices

type TSNode =
    val mutable context0: uint32

module Native =

    [<Literal>]
    let core = "tree-sitter"

    /// <summary>Whether the parser had to guess anywhere inside this node.</summary>
    [<DllImport(core)>]
    [<return: MarshalAs(UnmanagedType.I1)>]
    extern bool ts_node_has_error(TSNode node)

Deleted line:

    /// <summary>Whether the parser had to guess anywhere inside this node.</summary>
    [<DllImport(core)>]
-   [<return: MarshalAs(UnmanagedType.I1)>]
    extern bool ts_node_has_error(TSNode node)

I did not use Fantomas tools to report the issue because I was not able to reproduce the issue there.

Version: Fantomas v8.0.0-alpha-016+ed505f637

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions