mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user