New Issue Checklist
Bug Description
struct S1 {
struct S1 {}
var s = S1()
}
prefer_self_in_static_references will report a violation at var s = S1(), but S1 here refers to the inner struct, not the outer one, so var s= Self() would be different, and would fail if the inner S1 has different properties to the outer one.
As a workaround,
struct S1 {
struct S1 {}
var s = Self.S1()
}
Has the same effect, but does not trigger prefer_self_in_static_references.
New Issue Checklist
Bug Description
prefer_self_in_static_referenceswill report a violation atvar s = S1(), but S1 here refers to the inner struct, not the outer one, sovar s= Self()would be different, and would fail if the inner S1 has different properties to the outer one.As a workaround,
Has the same effect, but does not trigger
prefer_self_in_static_references.