Implement default definitions for associated types.

Addresses <rdar://problem/14292873>.


Swift SVN r11422
This commit is contained in:
Doug Gregor
2013-12-18 06:24:53 +00:00
parent fdd16143a8
commit ec4913b0ea
13 changed files with 172 additions and 31 deletions

View File

@@ -1130,12 +1130,14 @@ void Serializer::writeDecl(const Decl *D) {
const Decl *DC = getDeclForContext(assocType->getDeclContext());
unsigned abbrCode = DeclTypeAbbrCodes[AssociatedTypeDeclLayout::Code];
AssociatedTypeDeclLayout::emitRecord(Out, ScratchRecord, abbrCode,
addIdentifierRef(assocType->getName()),
addDeclRef(DC),
addTypeRef(assocType->getSuperclass()),
addTypeRef(assocType->getArchetype()),
assocType->isImplicit());
AssociatedTypeDeclLayout::emitRecord(
Out, ScratchRecord, abbrCode,
addIdentifierRef(assocType->getName()),
addDeclRef(DC),
addTypeRef(assocType->getSuperclass()),
addTypeRef(assocType->getArchetype()),
addTypeRef(assocType->getDefaultDefinitionType()),
assocType->isImplicit());
writeConformances(assocType->getProtocols(),
assocType->getConformances(),