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 file generation does not handle statically resolved type parameter #13760

Closed
nojaf opened this issue Aug 23, 2022 · 1 comment
Closed
Labels
Area-Compiler-SigFileGen generation of signature files - both compiler and IDE Bug

Comments

@nojaf
Copy link
Contributor

nojaf commented Aug 23, 2022

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.

@nojaf
Copy link
Contributor Author

nojaf commented Sep 1, 2022

Appears to be no longer a problem in dotnet 7.

@nojaf nojaf closed this as completed Sep 1, 2022
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 Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants