Skip to content

Commit c49c3d9

Browse files
committed
Remove now unnecessary special case
1 parent 4e1018d commit c49c3d9

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
@@ -1391,20 +1391,7 @@ AnyFunctionRef::getYieldResultsImpl(SmallVectorImpl<AnyFunctionType::Yield> &buf
13911391
bool mapIntoContext) const {
13921392
assert(buffer.empty());
13931393
if (auto *AFD = getAbstractFunctionDecl()) {
1394-
// FIXME: AccessorDecl case is not necessary
1395-
if (auto *AD = dyn_cast<AccessorDecl>(AFD)) {
1396-
if (AD->isCoroutine()) {
1397-
auto valueTy = AD->getStorage()->getValueInterfaceType()
1398-
->getReferenceStorageReferent();
1399-
if (mapIntoContext)
1400-
valueTy = AFD->mapTypeIntoContext(valueTy);
1401-
YieldTypeFlags flags(isYieldingMutableAccessor(AD->getAccessorKind())
1402-
? ParamSpecifier::InOut
1403-
: ParamSpecifier::LegacyShared);
1404-
buffer.push_back(AnyFunctionType::Yield(valueTy, flags));
1405-
return buffer;
1406-
}
1407-
} else if (AFD->isCoroutine()) {
1394+
if (AFD->isCoroutine()) {
14081395
auto fnType = AFD->getInterfaceType();
14091396
if (fnType->hasError())
14101397
return {};

0 commit comments

Comments
 (0)