[serialization] Add support for UnboundGenericTypes.

I had previously thought these didn't appear in public decls, but they're
used when you extend a generic class without generic arguments.

Swift SVN r6187
This commit is contained in:
Jordan Rose
2013-07-11 23:35:25 +00:00
parent 37d9ae4e09
commit e0301b6037
3 changed files with 29 additions and 2 deletions

View File

@@ -1601,6 +1601,17 @@ Type ModuleFile::getType(TypeID TID) {
break;
}
case decls_block::UNBOUND_GENERIC_TYPE: {
DeclID genericID;
TypeID parentID;
decls_block::UnboundGenericTypeLayout::readRecord(scratch,
genericID, parentID);
auto genericDecl = cast<NominalTypeDecl>(getDecl(genericID));
typeOrOffset = UnboundGenericType::get(genericDecl, getType(parentID), ctx);
break;
}
default:
// We don't know how to deserialize this kind of type.
error();