Skip to content

Commit 8a13ced

Browse files
committed
NCGenerics: claim to have Escapable runtime info.
We are suppose to be able to query whether a type is Escapable or not at runtime, in order to handle plain extensions of conditionally-Escapable types, which are implicitly like this: ``` struct S<T: ~Escapable>: ~Escapable {} extension S: Escapable where T: Escapable {} extension S: P where T: Escapable {} // <- requires runtime information ``` While that's not yet implemented, it eventually will be once NonescapableTypes matures.
1 parent 69e8263 commit 8a13ced

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckProtocol.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,8 @@ static bool hasAdditionalSemanticChecks(ProtocolDecl *proto) {
22082208
/// runtime for an arbitrary type.
22092209
static bool hasRuntimeConformanceInfo(ProtocolDecl *proto) {
22102210
return !proto->isMarkerProtocol()
2211-
|| proto->isSpecificProtocol(KnownProtocolKind::Copyable);
2211+
|| proto->isSpecificProtocol(KnownProtocolKind::Copyable)
2212+
|| proto->isSpecificProtocol(KnownProtocolKind::Escapable);
22122213
}
22132214

22142215
static void ensureRequirementsAreSatisfied(ASTContext &ctx,

0 commit comments

Comments
 (0)