Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetToolTipText gets the same XML signature for several member overloads #6244

Closed
nightroman opened this issue Feb 19, 2019 · 2 comments
Closed
Milestone

Comments

@nightroman
Copy link
Contributor

nightroman commented Feb 19, 2019

As suggested by @baronfel I copy the issue from FSharp.Compiler.Service, see fsharp/fsharp-compiler-docs#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.

@vasily-kirichenko
Copy link
Contributor

I tried to fix it in #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)")

@nightroman
Copy link
Contributor Author

This looks correct! Thank you for dealing with this long standing issue.

@cartermp cartermp added this to the 16.1 milestone Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants