Fix (de-)serialization of opaque result types for structural opaque types.

Serialize the ordinal value of OpaqueTypeArchetypeTypes and properly
set the interface type of OpaqueTypeDecl on deserialization.
This commit is contained in:
Doug Gregor
2021-12-24 22:59:37 -08:00
parent 99a9c021e2
commit 73ae727e5f
3 changed files with 22 additions and 29 deletions

View File

@@ -4485,7 +4485,8 @@ public:
auto substMapID = S.addSubstitutionMapRef(archetypeTy->getSubstitutions());
unsigned abbrCode = S.DeclTypeAbbrCodes[OpaqueArchetypeTypeLayout::Code];
OpaqueArchetypeTypeLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode,
declID, substMapID);
declID, archetypeTy->getOrdinal(),
substMapID);
}
void visitNestedArchetypeType(const NestedArchetypeType *archetypeTy) {