File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2871,8 +2871,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2871
2871
DescriptiveDeclKind::Class, path);
2872
2872
}
2873
2873
2874
- for (Decl *Member : CD->getMembers ())
2874
+ for (Decl *Member : CD->getMembers ()) {
2875
2875
visit (Member);
2876
+ }
2876
2877
2877
2878
// If this class requires all of its stored properties to have
2878
2879
// in-class initializers, diagnose this now.
@@ -2981,6 +2982,11 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2981
2982
2982
2983
TC.checkDeclCircularity (CD);
2983
2984
TC.ConformanceContexts .push_back (CD);
2985
+
2986
+ for (auto Member : CD->getMembers ()) {
2987
+ if (auto VD = dyn_cast<ValueDecl>(Member))
2988
+ TC.requestMemberLayout (VD);
2989
+ }
2984
2990
}
2985
2991
2986
2992
void visitProtocolDecl (ProtocolDecl *PD) {
@@ -5529,6 +5535,9 @@ void TypeChecker::addImplicitConstructors(NominalTypeDecl *decl) {
5529
5535
*this , classDecl, superclassCtor, kind)) {
5530
5536
Context.addSynthesizedDecl (ctor);
5531
5537
classDecl->addMember (ctor);
5538
+
5539
+ if (classDecl->hasValidatedLayout ())
5540
+ requestMemberLayout (ctor);
5532
5541
}
5533
5542
}
5534
5543
You can’t perform that action at this time.
0 commit comments