Version Used: e1a7480
Steps to Reproduce:
<PropertyGroup>
<LangVersion>11</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
/// <summary>
/// <see cref="M(ref readonly int)"/>
/// </summary>
class C
{
public static void M(ref readonly int x)
{
Console.WriteLine(x);
}
}
Diagnostic Id: CS1658, CS8652
Expected Behavior: Visual Studio suggests upgrading language version as a code action on the cref="M(ref readonly int)" where the following warning is reported:
CS1658: The feature 'ref readonly parameters' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.. See also error CS8652.
Actual Behavior: Visual Studio suggest upgrading language version only for error CS8652 emitted for public static void M(ref readonly int x) declaration, but not when the same error is emitted as warning inside the doc comment (implemented here - notice the forceWarning: true parameter):
|
CheckFeatureAvailability(parameter.ReadOnlyKeyword, MessageID.IDS_FeatureRefReadonlyParameters, diagnostics, forceWarning: true); |
Note that this example is about ref readonly parameters, but similar issue probably holds for other scenarios.
Version Used: e1a7480
Steps to Reproduce:
Diagnostic Id: CS1658, CS8652
Expected Behavior: Visual Studio suggests upgrading language version as a code action on the
cref="M(ref readonly int)"where the following warning is reported:CS1658: The feature 'ref readonly parameters' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.. See also error CS8652.
Actual Behavior: Visual Studio suggest upgrading language version only for error CS8652 emitted for
public static void M(ref readonly int x)declaration, but not when the same error is emitted as warning inside the doc comment (implemented here - notice theforceWarning: trueparameter):roslyn/src/Compilers/CSharp/Portable/Binder/Binder_Crefs.cs
Line 938 in e1a7480
Note that this example is about
ref readonlyparameters, but similar issue probably holds for other scenarios.