@@ -48,19 +48,31 @@ extension MyStruct {
4848 func concreteExt_None_TConformsToSomeProto< U> ( _ x: U ) -> Int where T: SomeProto { return 1 }
4949}
5050
51+ protocol Proto_Int { }
52+ extension Proto_Int {
53+ func conditional_Int( ) -> Int { return 1 }
54+ }
55+ protocol Proto_String { }
56+ extension Proto_String {
57+ func conditional_String( ) -> Int { return 1 }
58+ }
59+ extension MyStruct : Proto_Int where T == Int { }
60+ extension MyStruct : Proto_String where T == String { }
61+
5162func foo( s: MyStruct < Int > ) {
5263 let _ = s. #^MYSTRUCT_INT_DOT^#
53- // MYSTRUCT_INT_DOT: Begin completions, 6 items
64+ // MYSTRUCT_INT_DOT: Begin completions, 7 items
5465// MYSTRUCT_INT_DOT-DAG: Keyword[self]/CurrNominal: self[#MyStruct<Int>#]; name=self
5566// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: methodWithConstrainedGenericParam({#x: SomeProto#})[#Int#]; name=methodWithConstrainedGenericParam(x: SomeProto)
5667// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_TEqInt_None()[#Int#]; name=concreteExt_TEqInt_None()
5768// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_None_TEqInt({#(x): U#})[#Int#]; name=concreteExt_None_TEqInt(x: U)
5869// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_AssocEqInt_None()[#Int#]; name=protoExt_AssocEqInt_None()
5970// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_None_AssocEqInt({#(x): U#})[#Int#]; name=protoExt_None_AssocEqInt(x: U)
71+ // MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: conditional_Int()[#Int#]; name=conditional_Int()
6072// MYSTRUCT_INT_DOT: End completions
6173
6274 let _ = MyStruct < Int > . #^META_MYSTRUCT_INT_DOT^#
63- // META_MYSTRUCT_INT_DOT: Begin completions, 10 items
75+ // META_MYSTRUCT_INT_DOT: Begin completions, 11 items
6476// META_MYSTRUCT_INT_DOT-DAG: Keyword[self]/CurrNominal: self[#MyStruct<Int>.Type#]; name=self
6577// META_MYSTRUCT_INT_DOT-DAG: Keyword/CurrNominal: Type[#MyStruct<Int>.Type#]; name=Type
6678// META_MYSTRUCT_INT_DOT-DAG: Decl[TypeAlias]/CurrNominal: Assoc[#T#]; name=Assoc
@@ -71,6 +83,7 @@ func foo(s: MyStruct<Int>) {
7183// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_None_TEqInt({#(self): MyStruct<Int>#})[#(U) -> Int#]; name=concreteExt_None_TEqInt(self: MyStruct<Int>)
7284// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_AssocEqInt_None({#(self): MyStruct<Int>#})[#() -> Int#]; name=protoExt_AssocEqInt_None(self: MyStruct<Int>)
7385// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_None_AssocEqInt({#(self): MyStruct<Int>#})[#(U) -> Int#]; name=protoExt_None_AssocEqInt(self: MyStruct<Int>)
86+ // META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: conditional_Int({#(self): MyStruct<Int>#})[#() -> Int#]; name=conditional_Int(self: MyStruct<Int>)
7487// META_MYSTRUCT_INT_DOT: End completions
7588}
7689
0 commit comments