Skip to content

Commit d5b33ba

Browse files
committed
Only allow non resilient non-delegating initializers for now
1 parent 8f0fbd2 commit d5b33ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/AST/Decl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6343,9 +6343,9 @@ ConstructorDecl::getDelegatingOrChainedInitKind(DiagnosticEngine *diags,
63436343
// non-delegating. However, if the struct isn't fixed-layout, we have to
63446344
// be delegating because, well, we don't know the layout.
63456345
// A dynamic replacement is permitted to be non-delegating.
6346-
if ((NTD->isResilient() ||
6347-
containingModule->getASTContext().isSwiftVersionAtLeast(5)) &&
6348-
!getAttrs().getAttribute<DynamicReplacementAttr>()) {
6346+
if (NTD->isResilient() ||
6347+
(containingModule->getASTContext().isSwiftVersionAtLeast(5) &&
6348+
!getAttrs().getAttribute<DynamicReplacementAttr>())) {
63496349
if (containingModule != NTD->getParentModule())
63506350
Kind = BodyInitKind::Delegating;
63516351
}

0 commit comments

Comments
 (0)