@@ -763,17 +763,6 @@ template <> struct DenseMapInfo<FoundDeclTy> {
763
763
764
764
namespace {
765
765
766
- // / Hack to guess at whether substituting into the type of a declaration will
767
- // / be okay.
768
- // / FIXME: This is awful. We should either have Type::subst() work for
769
- // / GenericFunctionType, or we should kill it outright.
770
- static bool shouldSubstIntoDeclType (Type type) {
771
- auto genericFnType = type->getAs <GenericFunctionType>();
772
- if (!genericFnType) return true ;
773
-
774
- return false ;
775
- }
776
-
777
766
class OverrideFilteringConsumer : public VisibleDeclConsumer {
778
767
public:
779
768
std::set<ValueDecl *> AllFoundDecls;
@@ -865,8 +854,7 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
865
854
866
855
auto FoundSignature = VD->getOverloadSignature ();
867
856
auto FoundSignatureType = VD->getOverloadSignatureType ();
868
- if (FoundSignatureType && shouldSubst &&
869
- shouldSubstIntoDeclType (FoundSignatureType)) {
857
+ if (FoundSignatureType && shouldSubst) {
870
858
auto subs = BaseTy->getMemberSubstitutionMap (M, VD);
871
859
if (auto CT = FoundSignatureType.subst (subs))
872
860
FoundSignatureType = CT->getCanonicalType ();
@@ -883,8 +871,7 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
883
871
884
872
auto OtherSignature = OtherVD->getOverloadSignature ();
885
873
auto OtherSignatureType = OtherVD->getOverloadSignatureType ();
886
- if (OtherSignatureType && shouldSubst &&
887
- shouldSubstIntoDeclType (OtherSignatureType)) {
874
+ if (OtherSignatureType && shouldSubst) {
888
875
auto subs = BaseTy->getMemberSubstitutionMap (M, OtherVD);
889
876
if (auto CT = OtherSignatureType.subst (subs))
890
877
OtherSignatureType = CT->getCanonicalType ();
0 commit comments