Skip to content

Commit 24b5c2c

Browse files
7sharp9baronfel
authored andcommitted
Add symbol creation for an operator with a constraint (#6307)
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: fsharp#896
1 parent 5d44ce1 commit 24b5c2c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/fsharp/symbols/Symbols.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol -
290290
| Item.ArgName(id, ty, _) ->
291291
FSharpParameter(cenv, ty, {Attribs=[]; Name=Some id}, Some id.idRange, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) :> _
292292

293+
| Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) ->
294+
FSharpMemberOrFunctionOrValue(cenv, V vref, item) :> _
295+
293296
// TODO: the following don't currently return any interesting subtype
294297
| Item.ImplicitOp _
295298
| Item.ILField _

0 commit comments

Comments
 (0)