PolySharp
PolySharp copied to clipboard
Polyfil for `ConstantExpectedAttribute`
Description
The ConstantExpectedAttribute
attribute was added in net7.0 MS Docs
Rationale
Along with CA1856: Incorrect usage of ConstantExpected attribute, this will help enforce parameters that are expected to be constants
Proposed API
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/ConstantExpectedAttribute.cs
Drawbacks
??
Alternatives
??
Other thoughts
None.