Skip to content

Unexpected shorthand lambda FS3570 with nested ignored tuple elements #16530

Closed

Description

@cmeeren

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.

Activity

  1. added this to the Backlog milestone on Jan 16, 2024
  2. T-Gro commented on Jan 24, 2024

    @T-Gro
    Member

    @cmeeren :

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

  3. T-Gro commented on Jan 24, 2024

    @T-Gro
    Member

    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions