Skip to content

Commit b43c395

Browse files
committed
AST: Map ParamDecl types out of context when mangling
1 parent 01bb403 commit b43c395

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/AST/Mangle.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,13 @@ Type Mangler::getDeclTypeForMangling(const ValueDecl *decl,
489489
if (!decl->hasInterfaceType())
490490
return ErrorType::get(C);
491491

492+
// FIXME: Interface types for ParamDecls
492493
Type type = decl->getInterfaceType();
494+
if (type->hasArchetype()) {
495+
assert(isa<ParamDecl>(decl));
496+
type = ArchetypeBuilder::mapTypeOutOfContext(
497+
decl->getDeclContext(), type);
498+
}
493499

494500
initialParamDepth = 0;
495501
CanGenericSignature sig;

0 commit comments

Comments
 (0)