PolySharp icon indicating copy to clipboard operation
PolySharp copied to clipboard

Polyfil for `ConstantExpectedAttribute`

Open JR-Morgan opened this issue 2 months ago • 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.

JR-Morgan avatar Apr 23 '24 14:04 JR-Morgan