@@ -48,19 +48,31 @@ extension MyStruct {
48
48
func concreteExt_None_TConformsToSomeProto< U> ( _ x: U ) -> Int where T: SomeProto { return 1 }
49
49
}
50
50
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
+
51
62
func foo( s: MyStruct < Int > ) {
52
63
let _ = s. #^MYSTRUCT_INT_DOT^#
53
- // MYSTRUCT_INT_DOT: Begin completions, 6 items
64
+ // MYSTRUCT_INT_DOT: Begin completions, 7 items
54
65
// MYSTRUCT_INT_DOT-DAG: Keyword[self]/CurrNominal: self[#MyStruct<Int>#]; name=self
55
66
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: methodWithConstrainedGenericParam({#x: SomeProto#})[#Int#]; name=methodWithConstrainedGenericParam(x: SomeProto)
56
67
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_TEqInt_None()[#Int#]; name=concreteExt_TEqInt_None()
57
68
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_None_TEqInt({#(x): U#})[#Int#]; name=concreteExt_None_TEqInt(x: U)
58
69
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_AssocEqInt_None()[#Int#]; name=protoExt_AssocEqInt_None()
59
70
// 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()
60
72
// MYSTRUCT_INT_DOT: End completions
61
73
62
74
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
64
76
// META_MYSTRUCT_INT_DOT-DAG: Keyword[self]/CurrNominal: self[#MyStruct<Int>.Type#]; name=self
65
77
// META_MYSTRUCT_INT_DOT-DAG: Keyword/CurrNominal: Type[#MyStruct<Int>.Type#]; name=Type
66
78
// META_MYSTRUCT_INT_DOT-DAG: Decl[TypeAlias]/CurrNominal: Assoc[#T#]; name=Assoc
@@ -71,6 +83,7 @@ func foo(s: MyStruct<Int>) {
71
83
// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_None_TEqInt({#(self): MyStruct<Int>#})[#(U) -> Int#]; name=concreteExt_None_TEqInt(self: MyStruct<Int>)
72
84
// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_AssocEqInt_None({#(self): MyStruct<Int>#})[#() -> Int#]; name=protoExt_AssocEqInt_None(self: MyStruct<Int>)
73
85
// 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>)
74
87
// META_MYSTRUCT_INT_DOT: End completions
75
88
}
76
89
0 commit comments