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

Unexpected shorthand lambda FS3570 with nested ignored tuple elements #16530

Closed
cmeeren opened this issue Jan 16, 2024 · 2 comments
Closed

Unexpected shorthand lambda FS3570 with nested ignored tuple elements #16530

cmeeren opened this issue Jan 16, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Jan 16, 2024

I get an unexpected FS3570 when using nested ignored tuple elements:

    type A = { A: int }

    let f ((_x, y), z) = z |> Option.map _.A

Expected behavior

Compiles.

Actual behavior

Error FS3570 : The meaning of _ is ambiguous here. It cannot be used for a discarded variable and a function shorthand in the same scope.

Known workarounds

Don't use shorthand lambda, or don't ignore nested tuple elements.

@T-Gro
Copy link
Member

T-Gro commented Jan 24, 2024

@cmeeren :

Hi.
This issue should have been fixed with #16334 and hopefully available in the preview SDK.

@T-Gro
Copy link
Member

T-Gro commented Jan 24, 2024

Please let me know if it still persists, I will then reopen the issue and have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants