Description
Current status
It seems that symbols for operators are sometimes picked up for document highlight and inline rename, but it's inconsistent. Given the following code in a .NET Core project:
module Operators =
let (>>=) a f = Result.bind f a
let (<*>) x f = f x
let (<!>) = Result.map
let (<+>) x f = f x
let (<?>) x f = f x
open Operators
[<EntryPoint>]
let main argv =
(float <!> (Ok 12)) |> ignore
printfn "Hello World from F#!"
0 // return an integer exit code
There three notable issues. Some of these are driven by the same root cause as #3873.
- Symbols for operators except for
>>=
are picked up. For>>=
, there is nothing - no QuickInfo, no document highlight, etc. - When you try to rename
<!>
at the call site, it will escape the symbol with double backticks.
Note that colorization of >>=
and any operator that starts with >
is similarly affected, as per #10272
Update 2
Modules are now found at the open site by Inline Rename and Find all References due to #3803, thanks @vasily-kirichenko
Update 1
Using 15.4.1, and given the following code:
module Foo =
let (>.>) x f = f x
open Foo
[<EntryPoint>]
let main argv =
12. >.> sqrt |> ignore
0 // return an integer exit code
Click on Foo
at the declaration site:
Epected --> The Foo
at open Foo
is highlighted
Actual --> It's not.
Notice that Find Refs and Inline Rename also fail to pick up the symbol.
Click on >.>
anywhere it's used.
Expected --> Highlights the operator everywhere it exists
Actual --> No highlight
Find Refs and Inline Rename also do not pick up this symbol.
Old Issue
VS 2017 15.3 + 8/16/2017 nightly build.
Run Find all References or Rename on ThisIsAProperty
.
// Learn more about F# at http://fsharp.org
// See the 'F# Tutorial' project for more help.
open TestCS
type C() =
member val ThisIsAProperty = 12 with get, set
[<EntryPoint>]
let main argv =
let c = C()
c.ThisIsAProperty <- 0
0 // return an integer exit code
I don't think that this the same as #3033, because rename and FAR work for the class definition itself.
The above also fails on modules and customer operators.
Metadata
Metadata
Assignees
Type
Projects
Status