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
Copy file name to clipboardExpand all lines: test/Compatibility/accessibility.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -516,8 +516,8 @@ public struct PublicGenericIPReq<T: InternalProto> where T: PrivateProto {} // e
516
516
517
517
publicfunc genericFunc<T:InternalProto>(_:T){} // expected-error {{function cannot be declared public because its generic parameter uses an internal type}} {}
518
518
publicclassGenericClass<T:InternalProto>{ // expected-error {{generic class cannot be declared public because its generic parameter uses an internal type}}
519
-
publicinit<T:PrivateProto>(_:T){} // expected-error {{initializer cannot be declared public because its generic parameter uses a private type}}
520
-
publicfunc genericMethod<T:PrivateProto>(_:T){} // expected-error {{instance method cannot be declared public because its generic parameter uses a private type}}
519
+
publicinit<U:PrivateProto>(_:U){} // expected-error {{initializer cannot be declared public because its generic parameter uses a private type}}
520
+
publicfunc genericMethod<U:PrivateProto>(_:U){} // expected-error {{instance method cannot be declared public because its generic parameter uses a private type}}
521
521
}
522
522
publicenumGenericEnum<T:InternalProto>{ // expected-error {{generic enum cannot be declared public because its generic parameter uses an internal type}}
// expected-error@-1 {{cannot convert value of type 'T' (generic parameter of instance method 'bar(_:)') to expected argument type 'T' (generic parameter of generic struct 'S_24329052')}}
516
+
// expected-warning@-2 {{generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in Swift 6}}
0 commit comments