@@ -92,7 +92,7 @@ protocol HasAssocWithSuperClassConstraint {
92
92
}
93
93
protocol HasAssocWithCompositionConstraint {
94
94
associatedtype AssocWithCompositionConstraint : MyClass & MyProtocol
95
- subscript< T > ( idx: T ) -> AssocWithCompositionConstraint where T : Comparable { get }
95
+ subscript( idx: Int ) -> AssocWithCompositionConstraint { get }
96
96
}
97
97
protocol HasAssocWithDefault {
98
98
associatedtype AssocWithDefault = MyEnum
@@ -114,6 +114,10 @@ protocol HasAssocWithSameTypeConstraint where Self.AssocWithSameTypeConstraint =
114
114
associatedtype AssocWithSameTypeConstraint
115
115
func returnAssocWithSameTypeConstraint( ) -> AssocWithSameTypeConstraint
116
116
}
117
+ protocol HasAssocWithConformanceConstraintGeneric {
118
+ associatedtype AssocWithConformanceConstraintGeneric : MyProtocol
119
+ func returnAssocWithConformanceConstraintGeneric< T> ( arg: T ) -> AssocWithConformanceConstraintGeneric
120
+ }
117
121
118
122
class TestClass :
119
123
HasAssocPlain ,
@@ -124,18 +128,20 @@ class TestClass :
124
128
HasAssocWithConstraintAndDefault ,
125
129
HasAssocWithAnyObjectConstraint ,
126
130
HasAssocWithConstraintOnProto ,
127
- HasAssocWithSameTypeConstraint {
131
+ HasAssocWithSameTypeConstraint ,
132
+ HasAssocWithConformanceConstraintGeneric {
128
133
#^OVERRIDE_TestClass^#
129
134
// OVERRIDE: Begin completions
130
135
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocPlain() -> AssocPlain {|};
131
136
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithConformanceConstraint(fn: (Int) -> Int) -> some MyProtocol {|};
132
137
// OVERRIDE-DAG: Decl[InstanceVar]/Super: var valAssocWithSuperClassConstraint: some MyClass;
133
- // OVERRIDE-DAG: Decl[Subscript]/Super: subscript<T> (idx: T ) -> some MyClass & MyProtocol where T : Comparable {|};
138
+ // OVERRIDE-DAG: Decl[Subscript]/Super: subscript(idx: Int ) -> some MyClass & MyProtocol {|};
134
139
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithDefault() -> MyEnum {|};
135
140
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithConstraintAndDefault() -> ConcreteMyProtocol {|};
136
141
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithAnyObjectConstraint() -> some MyProtocol & AnyObject {|}
137
142
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithConstraintOnProto() -> some MyProtocol {|}
138
143
// OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithSameTypeConstraint() -> AssocWithSameTypeConstraint {|}
144
+ // OVERRIDE-DAG: Decl[InstanceMethod]/Super: func returnAssocWithConformanceConstraintGeneric<T>(arg: T) -> AssocWithConformanceConstraintGeneric {|}
139
145
// OVERRIDE: End completions
140
146
}
141
147
@@ -148,7 +154,8 @@ struct TestStruct :
148
154
HasAssocWithConstraintAndDefault ,
149
155
HasAssocWithAnyObjectConstraint ,
150
156
HasAssocWithConstraintOnProto ,
151
- HasAssocWithSameTypeConstraint {
157
+ HasAssocWithSameTypeConstraint ,
158
+ HasAssocWithConformanceConstraintGeneric {
152
159
#^OVERRIDE_TestStruct^#
153
160
}
154
161
0 commit comments