Skip to content

Commit 679c670

Browse files
committed
Remove now unnecessary special case
1 parent e38dae3 commit 679c670

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,20 +1171,7 @@ AnyFunctionRef::getYieldResultsImpl(SmallVectorImpl<AnyFunctionType::Yield> &buf
11711171
bool mapIntoContext) const {
11721172
assert(buffer.empty());
11731173
if (auto *AFD = getAbstractFunctionDecl()) {
1174-
// FIXME: AccessorDecl case is not necessary
1175-
if (auto *AD = dyn_cast<AccessorDecl>(AFD)) {
1176-
if (AD->isCoroutine()) {
1177-
auto valueTy = AD->getStorage()->getValueInterfaceType()
1178-
->getReferenceStorageReferent();
1179-
if (mapIntoContext)
1180-
valueTy = AFD->mapTypeIntoContext(valueTy);
1181-
YieldTypeFlags flags(isYieldingMutableAccessor(AD->getAccessorKind())
1182-
? ParamSpecifier::InOut
1183-
: ParamSpecifier::LegacyShared);
1184-
buffer.push_back(AnyFunctionType::Yield(valueTy, flags));
1185-
return buffer;
1186-
}
1187-
} else if (AFD->isCoroutine()) {
1174+
if (AFD->isCoroutine()) {
11881175
auto fnType = AFD->getInterfaceType();
11891176
if (fnType->hasError())
11901177
return {};

0 commit comments

Comments
 (0)