File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3643,7 +3643,9 @@ static bool areGenericRequirementsSatisfied(
3643
3643
3644
3644
// For every requirement, add a constraint.
3645
3645
for (auto Req : sig->getRequirements ()) {
3646
- if (auto resolved = Req.subst (Substitutions)) {
3646
+ if (auto resolved = Req.subst (
3647
+ QuerySubstitutionMap{Substitutions},
3648
+ LookUpConformanceInModule (DC->getParentModule ()))) {
3647
3649
CS.addConstraint (*resolved, Loc);
3648
3650
} else if (isExtension) {
3649
3651
return false ;
Original file line number Diff line number Diff line change 3
3
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONDITIONAL_OVERLOAD_ARG | %FileCheck %s -check-prefix=CONDITIONAL_OVERLOAD_ARG
4
4
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONDITIONAL_OVERLOAD_INIT_ARG | %FileCheck %s -check-prefix=CONDITIONAL_OVERLOAD_ARG
5
5
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONDITIONAL_INAPPLICABLE_ARG | %FileCheck %s -check-prefix=CONDITIONAL_INAPPLICABLE_ARG
6
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONDITIONAL_DEPENDENT_TYPEALIAS | %FileCheck %s -check-prefix=CONDITIONAL_DEPENDENT_TYPEALIAS
6
7
7
8
protocol SomeProto {
8
9
associatedtype Assoc
@@ -127,3 +128,22 @@ func testVegetarian(chef: Chef<Vegetarian>) {
127
128
chef. eat ( . #^CONDITIONAL_INAPPLICABLE_ARG^#)
128
129
// CONDITIONAL_INAPPLICABLE_ARG-NOT: Begin completion
129
130
}
131
+
132
+ // rdar://problem/53401609
133
+ protocol MyProto {
134
+ associatedtype Index
135
+ }
136
+ extension MyProto where Index: Strideable , Index. Stride == Int {
137
+ func indices( ) { }
138
+ }
139
+ struct MyConcrete { }
140
+ extension MyConcrete : MyProto {
141
+ typealias Index = Int
142
+ }
143
+ func testHasIndex( value: MyConcrete ) {
144
+ value. #^CONDITIONAL_DEPENDENT_TYPEALIAS^#
145
+ // CONDITIONAL_DEPENDENT_TYPEALIAS: Begin completions, 2 items
146
+ // CONDITIONAL_DEPENDENT_TYPEALIAS-DAG: Keyword[self]/CurrNominal: self[#MyConcrete#];
147
+ // CONDITIONAL_DEPENDENT_TYPEALIAS-DAG: Decl[InstanceMethod]/Super: indices()[#Void#];
148
+ // CONDITIONAL_DEPENDENT_TYPEALIAS: End completions
149
+ }
You can’t perform that action at this time.
0 commit comments