fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Completion is available for some obsolete members only

Open auduchinok opened this issue 3 years ago • 0 comments

public class Class
{
    [Obsolete("Field is obsolete")] public static readonly int ObsoleteField = 1;

    [Obsolete("Method is obsolete")]
    public static void ObsoleteMethod()
    {
    }

    [Obsolete("Property is obsolete")] public static int ObsoleteProperty => 1;
    [Obsolete("Event is obsolete")] public static event EventHandler ObsoleteEvent;
}

FCS code completion provides items for the field and the event, but not for the method and the property:

Screenshot 2022-07-14 at 14 08 05

I think the code completion should be more consistent here: hide all or show all, but not something in between.

A bit off-topic: it would be nice to allow enabling completion for obsolete items via an FSharpChecker setting or a completion API parameter.

auduchinok avatar Jul 14 '22 12:07 auduchinok