You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespaceMicrosoft.VisualStudio.FSharp.Editor.Tests.RoslynopenMicrosoft.CodeAnalysis.OptionsopenSystem.Collections.ImmutabletypeTestOptionSet(?values: ImmutableDictionary<OptionKey, obj>)=inherit OptionSet()letvalues= values |> Option.defaultValue ImmutableDictionary.Empty
override__.GetOption(optionKey:OptionKey)=
values.[optionKey]override__.WithChangedOption(optionAndLanguage:OptionKey,value:obj)=upcast TestOptionSet(values.SetItem(optionAndLanguage, value))// The member that I cannot override (FS0855)override__.GetChangedOptions(optionSet:OptionSet):seq<OptionKey>=
values
|> Seq.filter (fun(KeyValue(k,v))->
optionSet.GetOption(k)<> v
)|> Seq.map (fun(KeyValue(k,_))-> k)
I get the error message:
FS0855 No abstract or interface member was found that corresponds to this override
If I remove the override keyword from the GetChangedOptions member, I then get the following error:
FS0365 No implementation was given for 'OptionSet.GetChangedOptions(optionSet: OptionSet) : System.Collections.Generic.IEnumerable<OptionKey>'
I believe this may have something to do with the fact that GetChangedOptions is internal, but I can't specify that with the override keyword, otherwise I get:
FS0941 Accessibility modifiers are not permitted on overrides or interface implementations
Activity
majocha commentedon Sep 2, 2017
This looks not F# specific 😞 but rather a Roslyn issue.
majocha commentedon Sep 2, 2017
My guess is you'd need an additional InternalsVisibleToFSharp in Roslyn to implement this class.
dsyme commentedon Sep 4, 2017
cc @Pilchie
Pilchie commentedon Sep 11, 2017
Tags @jasonmalinowski and @sharwell on this one.
(Sorry for the delay, was on vacation when this hit my inbox).