As suggested by @baronfel I copy the issue from FSharp.Compiler.Service, see https://github.com/fsharp/FSharp.Compiler.Service/issues/800
Short description: for a method with several overloads, GetToolTipText incorrectly gets the same XML signature for all overloads. As a result, I cannot query proper info from XML afterwards, it is the same for different overloads.
Repro steps, full description, and the minimal code are provided there. There is also some discussion and the approximate location of the problem:
@vasily-kirichenko
I think the problem is at https://github.com/Microsoft/visualfsharp/blob/54c22cdea6e069db28d8dd16723e402e364aab44/src/fsharp/symbols/SymbolHelpers.fs#L622 where the first overload is always got (
minfo :: _). However, it's not clear how to pick a rightminfothere.
I tried to fix it in https://github.com/Microsoft/visualfsharp/pull/6246. It produces:
MainDescription: File.WriteAllText(path: string, contents: string) : unit
XmlDoc: XmlDocFileSignature
("C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll",
"M:System.IO.File.WriteAllText(System.String,System.String)")
MainDescription: File.WriteAllText(path: string, contents: string, encoding: System.Text.Encoding) : unit
XmlDoc: XmlDocFileSignature
("C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll",
"M:System.IO.File.WriteAllText(System.String,System.String,System.Text.Encoding)")
This looks correct! Thank you for dealing with this long standing issue.
Most helpful comment
I tried to fix it in https://github.com/Microsoft/visualfsharp/pull/6246. It produces: