Skip to content

[Repo Assist] feat: add code fix for wildcard _ -> in pattern match for FS0043#1472

Merged
Krzysztof-Cieslak merged 2 commits intomainfrom
repo-assist/rebase-pr-1157-add-missing-wildcard-operator-7a77e03ff9033bf4
Feb 26, 2026
Merged

[Repo Assist] feat: add code fix for wildcard _ -> in pattern match for FS0043#1472
Krzysztof-Cieslak merged 2 commits intomainfrom
repo-assist/rebase-pr-1157-add-missing-wildcard-operator-7a77e03ff9033bf4

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated PR from Repo Assist, created on behalf of @Krzysztof-Cieslak's request to rebase PR #1157.

Summary

This PR rebases the changes from #1157 by @jkone27 onto current main. It adds a code fix that suggests replacing the invalid |-> operator with the correct wildcard pattern | _ -> in a match expression when the F# compiler diagnostic FS0043 is raised.

Related issue: dotnet/fsharp#15748

Changes

  • src/FsAutoComplete/CodeFixes/AddMissingWildcardOperator.fs — new code fix implementation
  • src/FsAutoComplete/CodeFixes/AddMissingWildcardOperator.fsi — signature file
  • src/FsAutoComplete/LspServers/AdaptiveServerState.fs — register the new code fix
  • test/FsAutoComplete.Tests.Lsp/CodeFixTests/AddMissingWildcardOperatorTests.fs — test for the code fix
  • test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs — register test module

Rebase notes

The following adaptations were made when rebasing onto current main:

  • FsAutoComplete.Lsp.fs was removed from the codebase — that change was dropped
  • Code fix registration was moved from AdaptiveFSharpLspServer.fs to AdaptiveServerState.fs
  • ftestCaseAsynctestCaseAsync (focused test markers cause CI failures)
  • Fixed unused variable lineStr_lineStr (F# compiler error FS1182)

Test Status

✅ Build succeeded (dotnet build src/FsAutoComplete/FsAutoComplete.fsproj)
✅ Code formatted with dotnet fantomas

Closes #1157

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f. View source at https://github.com/githubnext/agentics/tree/f2c5cf1e4af58e09a93ba0703c6bf084711b265f/workflows/repo-assist.md.

Rebased changes from PR #1157 by @jkone27 onto current main.

Adds a code fix that suggests replacing the invalid infix operator '|->'
with the correct wildcard pattern '| _ ->' in a match expression when
the F# compiler diagnostic FS0043 is raised.

Closes #1157

Co-authored-by: jkone27 <10419217+jkone27@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Krzysztof-Cieslak Krzysztof-Cieslak marked this pull request as ready for review February 25, 2026 23:22
@Krzysztof-Cieslak Krzysztof-Cieslak enabled auto-merge (squash) February 25, 2026 23:34
@Krzysztof-Cieslak Krzysztof-Cieslak merged commit 0c2a2bf into main Feb 26, 2026
18 of 19 checks passed
github-actions bot added a commit that referenced this pull request Feb 26, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant