mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ClangImporter: More principled use of mapType{Into,OutOf}Context()
Before we would construct types containing a mix of interface and contextual types, and then map them in and out. Straighten this out. Note that I've also had to start untangling the issue where synthesized ParamDecls do not have an interface type.
This commit is contained in:
@@ -2106,6 +2106,7 @@ swift::createDesignatedInitOverride(TypeChecker &tc,
|
||||
// Apply the superclass substitutions to produce an interface
|
||||
// type in terms of the class generic signature.
|
||||
auto paramSubstTy = paramTy.subst(moduleDecl, subsMap, SubstOptions());
|
||||
decl->setInterfaceType(paramSubstTy);
|
||||
|
||||
// Map it to a contextual type in terms of the class's archetypes.
|
||||
decl->overwriteType(ArchetypeBuilder::mapTypeIntoContext(
|
||||
|
||||
Reference in New Issue
Block a user