From f126341a47a357c1df2530b2710390e35ae166fc Mon Sep 17 00:00:00 2001 From: Dave Thomas <7sharp9@users.noreply.github.com> Date: Wed, 6 Mar 2019 11:28:19 +0000 Subject: [PATCH] Add symbol creation for an operator with a constraint This addresses a situaltion where if you request a tooltip for an operator with a constraint no symbol is returned due to: Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) Being turned into a vanilla FSharpSymbol which has no real information about the symbol that the IDE can use. An corresponding issue was logged for ionide here: ionide/ionide-vscode-fsharp#1025 Corresponding PR at FCS: https://github.com/fsharp/FSharp.Compiler.Service/pull/896 --- src/fsharp/symbols/Symbols.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index 43622f44e5d..c1ddec999d8 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -290,6 +290,9 @@ type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol - | Item.ArgName(id, ty, _) -> FSharpParameter(cenv, ty, {Attribs=[]; Name=Some id}, Some id.idRange, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) :> _ + | Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) -> + FSharpMemberOrFunctionOrValue(cenv, V vref, item) :> _ + // TODO: the following don't currently return any interesting subtype | Item.ImplicitOp _ | Item.ILField _