File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed
Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2534,6 +2534,7 @@ impl sema {
25342534 if s.Bind {
25352535 ret
25362536 }
2537+ s.checked = true
25372538
25382539 if len(s.Generics) == 0 && len(s.Instances) == 0 {
25392540 mut ins := s.instance()
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ struct Struct {
5353 // Structure instances for each unique type combination of structure.
5454 // Nil if structure is never used.
5555 Instances: []&StructIns
56+
57+ checked: bool
5658}
5759
5860impl Struct {
Original file line number Diff line number Diff line change @@ -1165,7 +1165,7 @@ impl typeChecker {
11651165 // Disable gstruct collection.
11661166 self.s.meta.gstructs = self.s.meta.gstructs[:0]
11671167 self.s.meta.flags &= ^semametaGstruct
1168- } else {
1168+ } else if ins.Decl.checked {
11691169 // gstruct collection is not enable and semas are same.
11701170 // So this structure is instantiated in the it's own package.
11711171 // Check it immediately, otherwise some defines may remain unchecked.
You can’t perform that action at this time.
0 commit comments