Sergio0694/PolySharp

Polyfil for `ConstantExpectedAttribute`

JR-Morgan opened this issue · 0 comments

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.