Skip to content

Issue #279: Fix FSharpFunc unit type args #317

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

Merged
merged 5 commits into from
Feb 16, 2020
Merged

Conversation

kevmal
Copy link
Contributor

@kevmal kevmal commented Jun 27, 2019

Fixes #279

Problem is emitLambda relies on body.Type to build the FSharpFunc type. body.Type in the case of a _ -> unit function is System.Void so the type getting built is FSharpFunc<_,void>. Meanwhile a function of the form unit -> _ is fine since the first type argument uses the type of the lambda var.

I resorted to using FullName on the generic type definitions to check for FSharpFunc type, maybe there's a better way?

@dsyme
Copy link
Contributor

dsyme commented Sep 10, 2019

Could you add a corresponding test case for this please? THanks

@kevmal
Copy link
Contributor Author

kevmal commented Sep 10, 2019

Added some tests. Also there's a skipped test for #323.

@dsyme dsyme closed this Sep 12, 2019
@dsyme dsyme reopened this Sep 12, 2019
@dsyme dsyme merged commit 6e3933d into fsprojects:master Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with lambdas of the form (_ -> unit)
3 participants