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 @@ -2868,8 +2868,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2868
2868
DescriptiveDeclKind::Class, path);
2869
2869
}
2870
2870
2871
- for (Decl *Member : CD->getMembers ())
2871
+ for (Decl *Member : CD->getMembers ()) {
2872
2872
visit (Member);
2873
+ }
2873
2874
2874
2875
// If this class requires all of its stored properties to have
2875
2876
// in-class initializers, diagnose this now.
@@ -2978,6 +2979,11 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2978
2979
2979
2980
TC.checkDeclCircularity (CD);
2980
2981
TC.ConformanceContexts .push_back (CD);
2982
+
2983
+ for (auto Member : CD->getMembers ()) {
2984
+ if (auto VD = dyn_cast<ValueDecl>(Member))
2985
+ TC.requestMemberLayout (VD);
2986
+ }
2981
2987
}
2982
2988
2983
2989
void visitProtocolDecl (ProtocolDecl *PD) {
@@ -5528,6 +5534,9 @@ void TypeChecker::addImplicitConstructors(NominalTypeDecl *decl) {
5528
5534
*this , classDecl, superclassCtor, kind)) {
5529
5535
Context.addSynthesizedDecl (ctor);
5530
5536
classDecl->addMember (ctor);
5537
+
5538
+ if (classDecl->hasValidatedLayout ())
5539
+ requestMemberLayout (ctor);
5531
5540
}
5532
5541
}
5533
5542
You can’t perform that action at this time.
0 commit comments