Skip to content

Multiline interpolation failing indentation check? #20595

Description

@Thorium

Just a quick question, I'm not sure if this should be valid F# or no:

module test =
        let report = $"""# Summary

### Header

This is a table:
{[1;2;3] |> List.map (fun x -> sprintf "| %d |" x) |> String.concat "\n"}

The end."""
        printfn "%s" report

...as it fails for:

  {[1;2;3] |> List.map (fun x -> sprintf "| %d |" x) |> String.concat "\n"}
  --^

 error FS0058: Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (95:9). Try indenting this further.
To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions