Skip to content

Signature file generation does not handle statically resolved type parameter #13760

@nojaf

Description

@nojaf

When generating a signature file from a function with statically resolved type parameters, the generated code requires an additional space.

Repro steps

module MyApp.GoodStuff

let inline toString< ^revision when ^revision: (static member GetCommitHash: ^revision -> string)>
    (p: System.Threading.Tasks.Task< ^revision >)
    : string =
    ""

leads to

module MyApp.GoodStuff

val inline toString:
  p: System.Threading.Tasks.Task<^revision> -> string
    when ^revision: (static member GetCommitHash: ^revision -> string)

Expected behaviour

The generated signature should be considered equivalent to the backing source file.

Actual behaviour

The generated code isn't valid:

image

Known workarounds

Edit signature file by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions