@@ -768,17 +768,6 @@ template <> struct DenseMapInfo<FoundDeclTy> {
768
768
769
769
namespace {
770
770
771
- // / Hack to guess at whether substituting into the type of a declaration will
772
- // / be okay.
773
- // / FIXME: This is awful. We should either have Type::subst() work for
774
- // / GenericFunctionType, or we should kill it outright.
775
- static bool shouldSubstIntoDeclType (Type type) {
776
- auto genericFnType = type->getAs <GenericFunctionType>();
777
- if (!genericFnType) return true ;
778
-
779
- return false ;
780
- }
781
-
782
771
class OverrideFilteringConsumer : public VisibleDeclConsumer {
783
772
public:
784
773
std::set<ValueDecl *> AllFoundDecls;
@@ -870,8 +859,7 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
870
859
871
860
auto FoundSignature = VD->getOverloadSignature ();
872
861
auto FoundSignatureType = VD->getOverloadSignatureType ();
873
- if (FoundSignatureType && shouldSubst &&
874
- shouldSubstIntoDeclType (FoundSignatureType)) {
862
+ if (FoundSignatureType && shouldSubst) {
875
863
auto subs = BaseTy->getMemberSubstitutionMap (M, VD);
876
864
if (auto CT = FoundSignatureType.subst (subs))
877
865
FoundSignatureType = CT->getCanonicalType ();
@@ -888,8 +876,7 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
888
876
889
877
auto OtherSignature = OtherVD->getOverloadSignature ();
890
878
auto OtherSignatureType = OtherVD->getOverloadSignatureType ();
891
- if (OtherSignatureType && shouldSubst &&
892
- shouldSubstIntoDeclType (OtherSignatureType)) {
879
+ if (OtherSignatureType && shouldSubst) {
893
880
auto subs = BaseTy->getMemberSubstitutionMap (M, OtherVD);
894
881
if (auto CT = OtherSignatureType.subst (subs))
895
882
OtherSignatureType = CT->getCanonicalType ();
0 commit comments