AST: Prohibit archetypes in setInterfaceType()

This commit is contained in:
Slava Pestov
2016-11-28 01:01:01 -08:00
parent 835472b14f
commit 01bb403e55
5 changed files with 21 additions and 9 deletions

View File

@@ -2521,12 +2521,15 @@ void Serializer::writeDecl(const Decl *D) {
verifyAttrSerializable(param);
auto contextID = addDeclContextRef(param->getDeclContext());
Type type = (param->hasType()
? param->getType()
: Type());
Type interfaceType = (param->hasInterfaceType()
? param->getInterfaceType()
: Type());
Type type, interfaceType;
if (param->hasType()) {
type = param->getType();
interfaceType = param->getInterfaceType();
// FIXME: Interface types for ParamDecls
if (interfaceType->hasArchetype())
interfaceType = Type();
}
unsigned abbrCode = DeclTypeAbbrCodes[ParamLayout::Code];
ParamLayout::emitRecord(Out, ScratchRecord, abbrCode,