Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddTypeAnnotationToObjectOfIndetermianteType code fix adds wrong spacing #15810

Closed
Tracked by #15408
psfinaki opened this issue Aug 15, 2023 · 0 comments · Fixed by #15812
Closed
Tracked by #15408

AddTypeAnnotationToObjectOfIndetermianteType code fix adds wrong spacing #15810

psfinaki opened this issue Aug 15, 2023 · 0 comments · Fixed by #15812
Assignees
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Bug Needs-Triage
Milestone

Comments

@psfinaki
Copy link
Member

Consider these two versions of the same code:

let db = 
    [
        {| Name = "Liam"; Id = 2 |}
        {| Name = "Noel"; Id = 3 |}
    ]

let f = List.filter (fun x -> x.Id = 7) db

let db = 
    [
        {| Name = "Liam"; Id = 2 |}
        {| Name = "Noel"; Id = 3 |}
    ]

let f = List.filter (fun (x) -> x.Id = 7) db

image

Applied code fixes lead to different spacing:
image

Accidentally this is more an inconsistency than a bug - but definitely caused by the bug, same cause and treatment as this one

@psfinaki psfinaki self-assigned this Aug 15, 2023
@psfinaki psfinaki added the Area-LangService-CodeFixes Code fixes associated with diagnostics label Aug 15, 2023
@psfinaki psfinaki modified the milestones: Backlog, August-2023 Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Bug Needs-Triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant