Open
Description
Background and Motivation
DeclarationModifiers
is publicly available for code generation related workflows and contains all possible declaration modifiers. Previously it was missing fixed
modifier as it is quite rare in the wild. However, after a bug discovery it was added as an internal API in #78698. I don't see much reason in keeping it internal.
Proposed API
namespace Microsoft.CodeAnalysis.Editing;
public readonly record struct DeclarationModifiers
{
+ public bool IsFixed { get; }
+ public DeclarationModifiers WithIsFixed(bool isFixed)
+ public static DeclarationModifiers Fixed { get; }
}
Usage Examples
Alternative Designs
Risks
None I can think of