File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -932,17 +932,11 @@ AssociatedTypeInference::computeAbstractTypeWitness(
932
932
}
933
933
934
934
// If there is a generic parameter of the named type, use that.
935
- if (auto gpList = dc->getGenericParamsOfContext ()) {
936
- GenericTypeParamDecl *foundGP = nullptr ;
937
- for (auto gp : *gpList) {
938
- if (gp->getName () == assocType->getName ()) {
939
- foundGP = gp;
940
- break ;
941
- }
935
+ if (auto *genericSig = dc->getGenericSignatureOfContext ()) {
936
+ for (auto gp : genericSig->getInnermostGenericParams ()) {
937
+ if (gp->getName () == assocType->getName ())
938
+ return dc->mapTypeIntoContext (gp);
942
939
}
943
-
944
- if (foundGP)
945
- return dc->mapTypeIntoContext (foundGP->getDeclaredInterfaceType ());
946
940
}
947
941
948
942
return Type ();
You can’t perform that action at this time.
0 commit comments