Skip to content

Commit ef54982

Browse files
committed
Fix classification of non-generic noncopyables
We should not feature-guard types that use `~Copyable` only in an inheritance clause. (cherry picked from commit 6fc8123)
1 parent 1589853 commit ef54982

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/AST/FeatureSet.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -509,16 +509,6 @@ static bool usesFeatureNoncopyableGenerics(Decl *decl) {
509509
return true;
510510

511511
if (auto *valueDecl = dyn_cast<ValueDecl>(decl)) {
512-
if (isa<StructDecl, EnumDecl, ClassDecl>(decl)) {
513-
auto *nominalDecl = cast<NominalTypeDecl>(valueDecl);
514-
515-
InvertibleProtocolSet inverses;
516-
bool anyObject = false;
517-
getDirectlyInheritedNominalTypeDecls(nominalDecl, inverses, anyObject);
518-
if (!inverses.empty())
519-
return true;
520-
}
521-
522512
if (auto proto = dyn_cast<ProtocolDecl>(decl)) {
523513
auto reqSig = proto->getRequirementSignature();
524514

0 commit comments

Comments
 (0)