You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>Adds two numbers.</summary>/// <typeparamname="T">The number type.</typeparam>/// <paramname="x">The first number.</param>/// <paramname="y">Added to <paramrefname="x"/>.</param>letadd<'Twhen'T:>System.Numerics.INumber<'T>>(x:'T)(y:'T)= x + y
Renaming x (F2 in Visual Studio) rewrites the parameter and its uses in the body, but leaves name="x" in both <param> and <paramref> untouched, so the doc now documents a parameter that no longer exists. Renaming 'T likewise leaves <typeparam name="T"> behind.
Expected: the rename also updates the name attribute of every <param>, <paramref>, <typeparam> and <typeparamref> that refers to the renamed parameter, as it does in C#. This applies to let-bound functions, members, primary constructors and union case fields, and to type parameters.
Renaming
x(F2 in Visual Studio) rewrites the parameter and its uses in the body, but leavesname="x"in both<param>and<paramref>untouched, so the doc now documents a parameter that no longer exists. Renaming'Tlikewise leaves<typeparam name="T">behind.Expected: the rename also updates the
nameattribute of every<param>,<paramref>,<typeparam>and<typeparamref>that refers to the renamed parameter, as it does in C#. This applies to let-bound functions, members, primary constructors and union case fields, and to type parameters.Two things to keep in mind for the fix:
name="x"sits in the source:PreXmlDoc.ToXmlDocmerges the per-line ranges of the///lines into one, and FS3390 reports on the whole block. This is what Have PreXmlDoc/XmlDoc track names and ranges for param/paramref children #15134 asks to change.'Trenamed to'Umust becomeUinname="U", and a backticked name must be written without the backticks.Related: #15134