We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 964bd44 commit cbf08e4Copy full SHA for cbf08e4
include/swift/AST/Decl.h
@@ -3434,11 +3434,11 @@ class ProtocolDecl : public NominalTypeDecl {
3434
}
3435
3436
/// True if this protocol can only be conformed to by class types.
3437
- bool requiresClass() {
+ bool requiresClass() const {
3438
if (ProtocolDeclBits.RequiresClassValid)
3439
return ProtocolDeclBits.RequiresClass;
3440
3441
- return requiresClassSlow();
+ return const_cast<ProtocolDecl *>(this)->requiresClassSlow();
3442
3443
3444
/// Specify that this protocol is class-bounded, e.g., because it was
0 commit comments