[Sema/SILGen] Consider init exprs associated with init accessor properties for memberwise init

This commit is contained in:
Pavel Yaskevich
2023-06-15 13:12:11 -07:00
parent fc895b4ac3
commit f58d4077c4
4 changed files with 77 additions and 7 deletions

View File

@@ -144,12 +144,6 @@ static void maybeAddMemberwiseDefaultArg(ParamDecl *arg, VarDecl *var,
if (!var->getParentPattern()->getSingleVar())
return;
// FIXME: Don't attempt to synthesize default arguments for init
// accessor properties because there could be multiple properties
// with default values they are going to initialize.
if (var->getAccessor(AccessorKind::Init))
return;
// Whether we have explicit initialization.
bool isExplicitlyInitialized = false;
if (auto pbd = var->getParentPatternBinding()) {