You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structFullyGeneric<Foo>{} // expected-note 11 {{'Foo' declared as parameter to type 'FullyGeneric'}} expected-note 1 {{generic type 'FullyGeneric' declared here}}
266
266
267
267
structAnyClassBound<Foo:AnyObject>{} // expected-note {{'Foo' declared as parameter to type 'AnyClassBound'}} expected-note {{generic type 'AnyClassBound' declared here}}
268
+
// expected-note@-1{{requirement specified as 'Foo' : 'AnyObject'}}
268
269
structAnyClassBound2<Foo>where Foo:AnyObject{} // expected-note {{'Foo' declared as parameter to type 'AnyClassBound2'}}
structProtoBound<Foo:SubProto>{} // expected-note {{'Foo' declared as parameter to type 'ProtoBound'}} expected-note {{generic type 'ProtoBound' declared here}}
271
273
structProtoBound2<Foo>where Foo:SubProto{} // expected-note {{'Foo' declared as parameter to type 'ProtoBound2'}}
@@ -301,11 +303,11 @@ func testFixIts() {
301
303
_ =FullyGeneric<Any>()
302
304
303
305
_ =AnyClassBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{20-20=<AnyObject>}}
304
-
_ =AnyClassBound<Any>() // expected-error {{'Any' is not convertible to 'AnyObject'}}
306
+
_ =AnyClassBound<Any>() // expected-error {{'AnyClassBound' requires that 'Any' be a class type}}
305
307
_ =AnyClassBound<AnyObject>()
306
308
307
309
_ =AnyClassBound2() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{21-21=<AnyObject>}}
308
-
_ =AnyClassBound2<Any>() // expected-error {{'Any' is not convertible to 'AnyObject'}}
310
+
_ =AnyClassBound2<Any>() // expected-error {{'AnyClassBound2' requires that 'Any' be a class type}}
309
311
_ =AnyClassBound2<AnyObject>()
310
312
311
313
_ =ProtoBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{17-17=<<#Foo: SubProto#>>}}
0 commit comments