@@ -45,19 +45,31 @@ extension MyStruct {
45
45
func concreteExt_None_TConformsToSomeProto< U> ( _ x: U ) -> Int where T: SomeProto { return 1 }
46
46
}
47
47
48
+ protocol Proto_Int { }
49
+ extension Proto_Int {
50
+ func conditional_Int( ) -> Int { return 1 }
51
+ }
52
+ protocol Proto_String { }
53
+ extension Proto_String {
54
+ func conditional_String( ) -> Int { return 1 }
55
+ }
56
+ extension MyStruct : Proto_Int where T == Int { }
57
+ extension MyStruct : Proto_String where T == String { }
58
+
48
59
func foo( s: MyStruct < Int > ) {
49
60
let _ = s. #^MYSTRUCT_INT_DOT^#
50
- // MYSTRUCT_INT_DOT: Begin completions, 6 items
61
+ // MYSTRUCT_INT_DOT: Begin completions, 7 items
51
62
// MYSTRUCT_INT_DOT-DAG: Keyword[self]/CurrNominal: self[#MyStruct<Int>#]; name=self
52
63
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: methodWithConstrainedGenericParam({#x: SomeProto#})[#Int#]; name=methodWithConstrainedGenericParam(x: SomeProto)
53
64
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_TEqInt_None()[#Int#]; name=concreteExt_TEqInt_None()
54
65
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_None_TEqInt({#(x): U#})[#Int#]; name=concreteExt_None_TEqInt(x: U)
55
66
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_AssocEqInt_None()[#Int#]; name=protoExt_AssocEqInt_None()
56
67
// MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_None_AssocEqInt({#(x): U#})[#Int#]; name=protoExt_None_AssocEqInt(x: U)
68
+ // MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: conditional_Int()[#Int#]; name=conditional_Int()
57
69
// MYSTRUCT_INT_DOT: End completions
58
70
59
71
let _ = MyStruct < Int > . #^META_MYSTRUCT_INT_DOT^#
60
- // META_MYSTRUCT_INT_DOT: Begin completions, 10 items
72
+ // META_MYSTRUCT_INT_DOT: Begin completions, 11 items
61
73
// META_MYSTRUCT_INT_DOT-DAG: Keyword[self]/CurrNominal: self[#MyStruct<Int>.Type#]; name=self
62
74
// META_MYSTRUCT_INT_DOT-DAG: Keyword/CurrNominal: Type[#MyStruct<Int>.Type#]; name=Type
63
75
// META_MYSTRUCT_INT_DOT-DAG: Decl[TypeAlias]/CurrNominal: Assoc[#T#]; name=Assoc
@@ -68,5 +80,6 @@ func foo(s: MyStruct<Int>) {
68
80
// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/CurrNominal: concreteExt_None_TEqInt({#(self): MyStruct<Int>#})[#(U) -> Int#]; name=concreteExt_None_TEqInt(self: MyStruct<Int>)
69
81
// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_AssocEqInt_None({#(self): MyStruct<Int>#})[#() -> Int#]; name=protoExt_AssocEqInt_None(self: MyStruct<Int>)
70
82
// META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: protoExt_None_AssocEqInt({#(self): MyStruct<Int>#})[#(U) -> Int#]; name=protoExt_None_AssocEqInt(self: MyStruct<Int>)
83
+ // META_MYSTRUCT_INT_DOT-DAG: Decl[InstanceMethod]/Super: conditional_Int({#(self): MyStruct<Int>#})[#() -> Int#]; name=conditional_Int(self: MyStruct<Int>)
71
84
// META_MYSTRUCT_INT_DOT: End completions
72
85
}
0 commit comments