FsAutoComplete
FsAutoComplete copied to clipboard
Type test operator (:?) is unrecognized
open System
type Example () =
inherit Attribute ()
let attrs : Attribute list =
[ Example (); ObsoleteAttribute () ]
attrs |> List.filter (fun a -> a :? Example) |> List.length
_________________________________^^___ :(
No compile error / red squiggles, but the highlighting doesn't match and the tooltip request fails with the usual:
[Error - 11:28:38 PM] Request textDocument/hover failed. Message: No tooltip information Code: -32603
There ended up being two parts to this:
- we need to do some fallbacks to check if the thing being hovered is a keyword, and use the FCS-provided tooltips for those, and
- FCS needs to learn about
:?
and provide a tooltip for it like it does many other sigils.