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

Add Open Codefix does not work for operators #2473

Closed
Tracked by #15408
cartermp opened this issue Feb 22, 2017 · 2 comments · Fixed by #2474
Closed
Tracked by #15408

Add Open Codefix does not work for operators #2473

cartermp opened this issue Feb 22, 2017 · 2 comments · Fixed by #2474
Labels
Area-LangService-API Area-LangService-CodeFixes Code fixes associated with diagnostics Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@cartermp
Copy link
Contributor

cartermp commented Feb 22, 2017

Using RC4, enter the following in an F# script file:

module MyOps =
    let (>.>) x f = f(x)

let bananas xs =
    xs >.> List.map (fun x -> "bananas")

Expected: Lightbulb comes up, offering to open MyOps.

Actual: No lightbulb.

Note that this affects libraries such as Suave, where you need to open the Suave.Operators namespace to compose routes, and it's not always obvious to people that this is the case.

@cartermp cartermp added Area-LangService-API Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. labels Feb 22, 2017
@cartermp cartermp added this to the VS 2017 Updates milestone Feb 22, 2017
@cartermp
Copy link
Contributor Author

I can get it to trigger by adding FS0043 to the list of fixableDiagnosticIds. Looks like this:

codefix-maybe-work

The latter option actually causes the code to fail to compile because it's treated just as a regular function call. That suggestion could get filtered in this case, I guess.

@vasily-kirichenko any concerns about recognizing FS0043?

@vasily-kirichenko
Copy link
Contributor

@cartermp looks like a good fix.

@cartermp cartermp modified the milestones: VS 2017 Updates, 15.2 Jun 9, 2018
@psfinaki psfinaki added the Area-LangService-CodeFixes Code fixes associated with diagnostics label Jun 15, 2023
@psfinaki psfinaki mentioned this issue Jun 15, 2023
85 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-API Area-LangService-CodeFixes Code fixes associated with diagnostics Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants