Skip to content

Signature for generic type with generic static member #15403

@nojaf

Description

@nojaf

When generating a signature file the result is somewhat unexpected.
This feels a bit related to #15175 but might not be.

Repro steps

module Meh

type 'a Foo =
    {
        Bar: 'a array
        D: int
    }
    static member Make<'a> (array: 'a array) : 'a Foo = failwith "meh"

leads to

module Meh

type 'a Foo =
  {
    Bar: 'a array
    D: int
  }
  
  static member Make: array: 'a array -> 'a Foo

Expected behaviour

The generated signature is valid. But it needs Make<'a> in this case.

Actual behaviour

Module 'Meh' contains� static member Foo.Make<'a> : array: 'a array -> 'a Foo �but its signature specifies� static member Foo.Make: array: 'a array -> 'a Foo �The respective type parameter counts differ

Related information

FCS: FSharpCheckFileResults.GenerateSignature

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions