Fsharp: GetToolTipText gets the same XML signature for several member overloads

Created on 19 Feb 2019  路  2Comments  路  Source: dotnet/fsharp

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 right minfo there.

Area-FCS bug

Most helpful comment

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)")

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings