-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This issue involves adding, removing, clarification, or modification of an API.Feature - Ref FieldsFeature Requestapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implemented
Description
Background and Motivation
Include scoped modifier for parameter and local types from SymbolDisplay.
Proposed API
For SymbolDisplayLocalOptions, the IncludeRef option is extended to include scoped, and a new IncludeRefAndScoped option with the same value is added.
For SymbolDisplayParameterOptions, the IncludeParamsRefOut option is extended to include scoped, and a new IncludeParamsRefOutScoped option with the same value is added.
namespace Microsoft.CodeAnalysis
{
[Flags]
public enum SymbolDisplayLocalOptions
{
// ...
/// <summary>
- /// Includes the <c>ref</c> keyword for ref-locals.
+ /// Includes the <c>ref</c> keyword for ref-locals and the <c>scoped</c> keyword for scoped locals.
/// Replaced by <see cref="IncludeRefAndScoped"/>.
/// </summary>
IncludeRef = 1 << 2,
+ /// <summary>
+ /// Includes the <c>ref</c> keyword for ref-locals and the <c>scoped</c> keyword for scoped locals.
+ /// </summary>
+ IncludeRefAndScoped = 1 << 2,
}
[Flags]
public enum SymbolDisplayParameterOptions
{
// ...
/// <summary>
- /// Includes the <c>params</c>, <c>ref</c>, <c>in</c>, <c>out</c>, <c>ByRef</c>, <c>ByVal</c> keywords before parameters.
+ /// Includes the <c>params</c>, <c>scoped</c>, <c>ref</c>, <c>in</c>, <c>out</c>, <c>ByRef</c>, <c>ByVal</c> keywords before parameters.
/// Replaced by <see cref="IncludeParamsRefOutScoped"/>.
/// </summary>
IncludeParamsRefOut = 1 << 1,
+ /// <summary>
+ /// Includes the <c>params</c>, <c>scoped</c>, <c>ref</c>, <c>in</c>, <c>out</c>, <c>ByRef</c>, <c>ByVal</c> keywords before parameters.
+ /// </summary>
+ IncludeParamsRefOutScoped = 1 << 1,
}
}Usage Examples
// some lines of code hereAlternative Designs
Risks
Separated out from #61647. See #61647 (comment) that should be addressed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This issue involves adding, removing, clarification, or modification of an API.Feature - Ref FieldsFeature Requestapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implemented