Skip to content

Commit 1978553

Browse files
committed
fill in the MoveOnly* feature guards
1 parent 1356694 commit 1978553

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3114,11 +3114,13 @@ static bool usesFeatureFlowSensitiveConcurrencyCaptures(Decl *decl) {
31143114
}
31153115

31163116
static bool usesFeatureMoveOnly(Decl *decl) {
3117+
if (auto nominal = dyn_cast<NominalTypeDecl>(decl))
3118+
return nominal->isMoveOnly();
31173119
return false;
31183120
}
31193121

31203122
static bool usesFeatureMoveOnlyClasses(Decl *decl) {
3121-
return false;
3123+
return isa<ClassDecl>(decl) && usesFeatureMoveOnly(decl);
31223124
}
31233125

31243126
static bool usesFeatureOneWayClosureParameters(Decl *decl) {

0 commit comments

Comments
 (0)