提交 cfc9f37e 编写于 作者: D Dave Thomas 提交者: Kevin Ransom (msft)

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: https://github.com/fsharp/FSharp.Compiler.Service/pull/896
上级 a1822688
......@@ -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 _
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册