Skip to content

Unexpected shorthand lambda FS3570 with nested ignored tuple elements #16530

Closed
@cmeeren

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions