Skip to content

Commit a01a6bb

Browse files
committed
Remove an erroneous early-exit
1 parent d4906ac commit a01a6bb

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

lib/AST/Decl.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3978,17 +3978,16 @@ void NominalTypeDecl::synthesizeSemanticMembersIfNeeded(DeclName member) {
39783978
}
39793979
} else {
39803980
auto argumentNames = member.getArgumentNames();
3981-
if (member.isCompoundName() && argumentNames.size() != 1)
3982-
return;
3983-
3984-
if (baseName == DeclBaseName::createConstructor() &&
3985-
(member.isSimpleName() || argumentNames.front() == Context.Id_from)) {
3986-
action.emplace(ImplicitMemberAction::ResolveDecodable);
3987-
} else if (!baseName.isSpecial() &&
3988-
baseName.getIdentifier() == Context.Id_encode &&
3989-
(member.isSimpleName() ||
3990-
argumentNames.front() == Context.Id_to)) {
3991-
action.emplace(ImplicitMemberAction::ResolveEncodable);
3981+
if (!member.isCompoundName() || argumentNames.size() == 1) {
3982+
if (baseName == DeclBaseName::createConstructor() &&
3983+
(member.isSimpleName() || argumentNames.front() == Context.Id_from)) {
3984+
action.emplace(ImplicitMemberAction::ResolveDecodable);
3985+
} else if (!baseName.isSpecial() &&
3986+
baseName.getIdentifier() == Context.Id_encode &&
3987+
(member.isSimpleName() ||
3988+
argumentNames.front() == Context.Id_to)) {
3989+
action.emplace(ImplicitMemberAction::ResolveEncodable);
3990+
}
39923991
}
39933992
}
39943993

0 commit comments

Comments
 (0)