Skip to content

Commit 6fc8123

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

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
@@ -511,16 +511,6 @@ static bool usesFeatureNoncopyableGenerics(Decl *decl) {
511511
return true;
512512

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

0 commit comments

Comments
 (0)