Skip to content

Commit cbf08e4

Browse files
committed
AST: Make ProtocolDecl::requiresClass() const
1 parent 964bd44 commit cbf08e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/AST/Decl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3434,11 +3434,11 @@ class ProtocolDecl : public NominalTypeDecl {
34343434
}
34353435

34363436
/// True if this protocol can only be conformed to by class types.
3437-
bool requiresClass() {
3437+
bool requiresClass() const {
34383438
if (ProtocolDeclBits.RequiresClassValid)
34393439
return ProtocolDeclBits.RequiresClass;
34403440

3441-
return requiresClassSlow();
3441+
return const_cast<ProtocolDecl *>(this)->requiresClassSlow();
34423442
}
34433443

34443444
/// Specify that this protocol is class-bounded, e.g., because it was

0 commit comments

Comments
 (0)