Skip to content

Conversation

@psfinaki
Copy link
Contributor

fixes #15421

We started this code fix at the recent Amplifying F# session.

Change

type Band = { Name = string }

to

type Band = { Name : string }

Inspired by FsAutoComplete. :)

@psfinaki psfinaki requested a review from a team as a code owner June 20, 2023 20:54
Copy link
Member

@T-Gro T-Gro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment at codefix impl - the allocation path should be zero in case the diagnostic FS0010 is for something else.
Error FS0010 comes very often when typing for all sorts of reasons.

@0101
Copy link
Contributor

0101 commented Jun 21, 2023

Can we use the same code fix to also make the fix in the opposite direction? When = is expected but : is given.

@psfinaki
Copy link
Contributor Author

@0101

Can we use the same code fix to also make the fix in the opposite direction? When = is expected but : is given.

I'd keep it for a followup and maybe for a separate code fix. It would require different ParseTree logic.

@psfinaki psfinaki requested a review from T-Gro June 21, 2023 15:08
@psfinaki
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@psfinaki
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@psfinaki
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@psfinaki
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@psfinaki
Copy link
Contributor Author

psfinaki commented Aug 2, 2023

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 15456 in repo dotnet/fsharp

@psfinaki psfinaki enabled auto-merge (squash) August 2, 2023 20:40
@psfinaki psfinaki merged commit 015a5c0 into dotnet:main Aug 3, 2023
vzarytovskii added a commit that referenced this pull request Aug 4, 2023
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com>
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Petr <psfinaki@users.noreply.github.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
fix: change equals in record field definition to colon (#15456)
@psfinaki psfinaki deleted the codefixes-7 branch February 10, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Create a code fix to change equals in field type to colon

5 participants