Open
Description
Version Used:
dotnet 10.0.100-preview.4.25258.110
VS2022 Version 17.14.4 Preview 1.0
Steps to Reproduce:
public static class MyExtensions
{
extension (string s)
{
public int CountProp => s.Length; //Member 'CountProp' does not access instance data and can be marked as static
public int CountMeth() => s.Length; //Member 'CountMeth' does not access instance data and can be marked as static
}
}
Diagnostic Id:
CA1822
Expected Behavior:
No CA1822 since this property/method is accessing the receiver as if it was an instance method or whatever the right word is in compiler speak
Actual Behavior:
CA1822