You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And here's how MetadataValues.h defines ProtocolClassConstraint:
/// Flag that indicates whether an existential type is class-constrained or not.enumclassProtocolClassConstraint : bool {
/// The protocol is class-constrained, so only class types can conform to it.////// This must be 0 for ABI compatibility with Objective-C protocol_t records.
Class = false,
/// Any type can conform to the protocol.
Any = true,
};
Given this, hasClassConstraint would be more meaningful if it returned true when the corresponding bit is not set.
The text was updated successfully, but these errors were encountered:
The
hasClassConstraint
property ofProtocolDescriptor.Flags
returnstrue
if the corresponding bit is set in the protocol descriptor.However, when the bit is set, it means that the protocol is not class-constrained. Here's how
GenMeta.cpp
sets the bit:flags.setClassConstraint(Proto->requiresClass() ? ProtocolClassConstraint::Class : ProtocolClassConstraint::Any);
And here's how
MetadataValues.h
definesProtocolClassConstraint
:Given this,
hasClassConstraint
would be more meaningful if it returnedtrue
when the corresponding bit is not set.The text was updated successfully, but these errors were encountered: