We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beac603 commit aa4179eCopy full SHA for aa4179e
lib/IRGen/GenKeyPath.cpp
@@ -887,6 +887,15 @@ emitKeyPathComponent(IRGenModule &IGM,
887
componentCanSig, [&](GenericRequirement reqt) {
888
auto substType =
889
reqt.TypeParameter.subst(subs)->getCanonicalType();
890
+
891
+ // FIXME: This seems wrong. We used to just mangle opened archetypes as
892
+ // their interface type. Let's make that explicit now.
893
+ substType = substType.transformRec([](Type t) -> Optional<Type> {
894
+ if (auto *openedExistential = t->getAs<OpenedArchetypeType>())
895
+ return openedExistential->getInterfaceType();
896
+ return None;
897
+ })->getCanonicalType();
898
899
if (!reqt.Protocol) {
900
// Type requirement.
901
externalSubArgs.push_back(emitMetadataTypeRefForKeyPath(
0 commit comments