File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2781,6 +2781,11 @@ static ArrayRef<Decl *> evaluateMembersRequest(
2781
2781
// We need to add implicit initializers because they
2782
2782
// affect vtable layout.
2783
2783
TypeChecker::addImplicitConstructors (nominal);
2784
+
2785
+ // Destructors don't affect vtable layout, but TBDGen needs to
2786
+ // see them, so we also force the destructor here.
2787
+ if (auto *classDecl = dyn_cast<ClassDecl>(nominal))
2788
+ (void ) classDecl->getDestructor ();
2784
2789
}
2785
2790
2786
2791
// Force any conformances that may introduce more members.
Original file line number Diff line number Diff line change @@ -12,4 +12,11 @@ public func f() -> Int {}
12
12
// get type checked.
13
13
private func bad1( _: NotAThing ) -> DoesNotExist { }
14
14
15
- internal typealias Bad1 = NotEvenReal . DefinitelyNot
15
+ internal typealias Bad1 = NotEvenReal . DefinitelyNot
16
+
17
+ // Destructors
18
+ public class C { }
19
+
20
+ // CHECK: public class C {
21
+ // CHECK: deinit
22
+ // CHECK: }
You can’t perform that action at this time.
0 commit comments