You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
sebastien-marichal
changed the title
S2743 FN: Static fields of nested class inside generic class
Fix S2743 FN: Static fields of nested class inside generic class
May 29, 2024
Description
No issue is raised for static nested class fields that are not shared among instances of different close constructed types. (S2743)
Repro steps
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
The text was updated successfully, but these errors were encountered: