File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -307,9 +307,10 @@ static void collectPossibleCalleesByQualifiedLookup(
307
307
}
308
308
}
309
309
310
- auto fnType = baseTy->getMetatypeInstanceType ()->getTypeOfMember (
311
- DC.getParentModule (), VD, declaredMemberType);
312
-
310
+ auto subs = baseTy->getMetatypeInstanceType ()->getMemberSubstitutionMap (
311
+ DC.getParentModule (), VD,
312
+ VD->getInnermostDeclContext ()->getGenericEnvironmentOfContext ());
313
+ auto fnType = declaredMemberType.subst (subs, SubstFlags::UseErrorType);
313
314
if (!fnType)
314
315
continue ;
315
316
Original file line number Diff line number Diff line change 83
83
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_MEMBER_SECOND | %FileCheck %s -check-prefix=IMPLICIT_MEMBER_SECOND
84
84
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_MEMBER_SKIPPED | %FileCheck %s -check-prefix=IMPLICIT_MEMBER_SKIPPED
85
85
86
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ARCHETYPE_GENERIC_1 | %FileCheck %s -check-prefix=ARCHETYPE_GENERIC_1
87
+
86
88
var i1 = 1
87
89
var i2 = 2
88
90
var oi1 : Int ?
@@ -686,3 +688,12 @@ func testImplicitMember() {
686
688
// IMPLICIT_MEMBER_SKIPPED: Keyword/ExprSpecific: arg4: [#Argument name#];
687
689
// IMPLICIT_MEMBER_SKIPPED: End completions
688
690
}
691
+
692
+ struct Wrap < T> {
693
+ func method< U> ( _ fn: ( T ) -> U ) -> Wrap < U > { }
694
+ }
695
+ func testGenricMethodOnGenericOfArchetype< Wrapped> ( value: Wrap < Wrapped > ) {
696
+ value. method ( #^ARCHETYPE_GENERIC_1 ^#)
697
+ // ARCHETYPE_GENERIC_1: Begin completions
698
+ // ARCHETYPE_GENERIC_1: Decl[InstanceMethod]/CurrNominal: ['(']{#(fn): (Wrapped) -> _##(Wrapped) -> _#}[')'][#Wrap<_>#];
699
+ }
You can’t perform that action at this time.
0 commit comments