File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1022,8 +1022,6 @@ static void addImplicitInheritedConstructorsToClass(ClassDecl *decl) {
1022
1022
return ;
1023
1023
}
1024
1024
1025
- decl->setAddedImplicitInitializers ();
1026
-
1027
1025
// We can only inherit initializers if we have a superclass.
1028
1026
if (!decl->getSuperclassDecl () || !decl->getSuperclass ())
1029
1027
return ;
@@ -1166,10 +1164,10 @@ void TypeChecker::addImplicitConstructors(NominalTypeDecl *decl) {
1166
1164
if (decl->addedImplicitInitializers ())
1167
1165
return ;
1168
1166
1169
- if (!shouldAttemptInitializerSynthesis (decl)) {
1170
- decl->setAddedImplicitInitializers ();
1167
+ decl->setAddedImplicitInitializers ();
1168
+
1169
+ if (!shouldAttemptInitializerSynthesis (decl))
1171
1170
return ;
1172
- }
1173
1171
1174
1172
if (auto *classDecl = dyn_cast<ClassDecl>(decl)) {
1175
1173
addImplicitInheritedConstructorsToClass (classDecl);
You can’t perform that action at this time.
0 commit comments