Skip to content

Wrong when expression parsing #9762

@auduchinok

Description

@auduchinok

The when expression in the following code is expected to be parsed as a sequence of ignore true and true, and the latter should be what the whole expression evaluates to.

match () with
| _ when
        ignore true
        true ->
    ()

The sequence expression is instead parsed as an application, ignore true true, and producing an error:
Screenshot 2020-07-23 at 20 35 05

idea-sandbox\config\scratches\scratch_4.fsx(3,9):
  error FS0003: This value is not a function and cannot be applied.

AST Viewer

This is similar to #7741.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions