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

Signature for generic type with generic static member #15403

Closed
nojaf opened this issue Jun 15, 2023 · 0 comments · Fixed by #15445
Closed

Signature for generic type with generic static member #15403

nojaf opened this issue Jun 15, 2023 · 0 comments · Fixed by #15445
Labels
Area-Compiler-SigFileGen generation of signature files - both compiler and IDE Needs-Triage
Milestone

Comments

@nojaf
Copy link
Contributor

nojaf commented Jun 15, 2023

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

@nojaf nojaf added the Area-Compiler-SigFileGen generation of signature files - both compiler and IDE label Jun 15, 2023
@github-actions github-actions bot added this to the Backlog milestone Jun 15, 2023
@github-project-automation github-project-automation bot moved this from Not Planned to Done in F# Compiler and Tooling Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-SigFileGen generation of signature files - both compiler and IDE Needs-Triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant