Skip to content

Incorrect new array indexing formatting #1985

Closed
@pbiggar

Description

Issue created from fantomas-online

Code

let segment = System.Uri(ctx.Request.Path.Value).Segments[1]

Result

let segment = System.Uri(ctx.Request.Path.Value).Segments [ 1 ]

Problem description

After formatting, there is a compiler error: "error FS3217: This expression is not a function and cannot be applied. Did you intend to access the indexer via 'expr[index]'"

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas 4.6 branch at 11/24/2021 18:43:36 - 9eb1365

Default Fantomas configuration

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions