-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
False NegativeRule is NOT triggered when it should be.Rule is NOT triggered when it should be.
Milestone
Description
Description
No issue is raised for static nested class fields that are not shared among instances of different close constructed types. (S2743)
Repro steps
public class StaticFieldInGenericClass<T>
where T : class
{
public static T tProp { get; set; }
internal string NestedClassUsage => NestedClass.StringField;
private static class NestedClass
{
public static readonly string StringField = "String"; // FN
}
}
Expected behavior
Issues are reported for the fields of the static nested class as they are not shared among instances of different close constructed types.
Actual behavior
No issues are reported.
Known workarounds
None
Related information
C#/VB.NET Plugins version: 8.18
Metadata
Metadata
Assignees
Labels
False NegativeRule is NOT triggered when it should be.Rule is NOT triggered when it should be.