mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #69842 from kavon/ncgenerics-stdlib-building
[NCGenerics] more work towards getting the stdlib building
This commit is contained in:
@@ -1568,11 +1568,12 @@ ModuleDecl::lookupExistentialConformance(Type type, ProtocolDecl *protocol) {
|
||||
if (!protocol->existentialConformsToSelf())
|
||||
return ProtocolConformanceRef::forInvalid();
|
||||
|
||||
// All existentials are Copyable.
|
||||
if (protocol->isSpecificProtocol(KnownProtocolKind::Copyable)) {
|
||||
return ProtocolConformanceRef(
|
||||
ctx.getBuiltinConformance(type, protocol,
|
||||
BuiltinConformanceKind::Synthesized));
|
||||
if (protocol->isSpecificProtocol(KnownProtocolKind::Copyable)
|
||||
&& !ctx.LangOpts.hasFeature(Feature::NoncopyableGenerics)) {
|
||||
// Prior to noncopyable generics, all existentials conform to Copyable.
|
||||
return ProtocolConformanceRef(
|
||||
ctx.getBuiltinConformance(type, protocol,
|
||||
BuiltinConformanceKind::Synthesized));
|
||||
}
|
||||
|
||||
auto layout = type->getExistentialLayout();
|
||||
|
||||
Reference in New Issue
Block a user