mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[GenericEnvironment] For opened pack element environments, only include element type
parameters whose originating packs are in a given shape equivalence class.
This commit is contained in:
@@ -1529,6 +1529,7 @@ void Serializer::writeASTBlockEntity(const GenericEnvironment *genericEnv) {
|
||||
|
||||
case GenericEnvironment::Kind::OpenedElement: {
|
||||
auto kind = GenericEnvironmentKind::OpenedElement;
|
||||
auto shapeClassID = addTypeRef(genericEnv->getOpenedElementShapeClass());
|
||||
auto parentSig = genericEnv->getGenericSignature();
|
||||
auto parentSigID = addGenericSignatureRef(parentSig);
|
||||
auto contextSubs = genericEnv->getPackElementContextSubstitutions();
|
||||
@@ -1536,7 +1537,7 @@ void Serializer::writeASTBlockEntity(const GenericEnvironment *genericEnv) {
|
||||
|
||||
auto genericEnvAbbrCode = DeclTypeAbbrCodes[GenericEnvironmentLayout::Code];
|
||||
GenericEnvironmentLayout::emitRecord(Out, ScratchRecord, genericEnvAbbrCode,
|
||||
unsigned(kind), /*existentialTypeID=*/0,
|
||||
unsigned(kind), shapeClassID,
|
||||
parentSigID, subsID);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user