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
@_typeEraser(MoreRestrictive) // expected-error {{internal type eraser 'MoreRestrictive' cannot have more restrictive access than protocol 'B6' (which is public)}}
60
+
publicprotocolB6{}
61
+
56
62
// MARK: - Type eraser must conform to the annotated protocol
publicinit<T:E1>(erasing t:T)where T:Hashable{} // expected-note {{'init(erasing:)' cannot have unsatisfied requirements when 'T' = 'some E1'}}
102
+
init<T:E1>(erasing t:T){} // expected-note {{internal 'init(erasing:)' cannot have more restrictive access than protocol 'E1' (which is public)}}
108
103
}
109
-
@_typeEraser(MoreRestrictive) // expected-error {{internal type eraser 'MoreRestrictive' cannot have more restrictive access than protocol 'E1' (which is public)}}
104
+
@_typeEraser(UnviableInits) // expected-error {{type eraser 'UnviableInits' has no viable initializer of the form 'init<T: E1>(erasing: T)'}}
110
105
publicprotocolE1{}
111
106
112
-
publicclassMoreRestrictiveInit:E2{
113
-
init<T:E2>(erasing t:T){} // expected-note {{internal 'init(erasing:)' cannot have more restrictive access than protocol 'E2' (which is public)}}
107
+
classFailableInit:E2{
108
+
init?<T:E2>(erasing t:T){} // expected-note {{'init(erasing:)' cannot be failable}}
114
109
}
115
-
@_typeEraser(MoreRestrictiveInit) // expected-error {{type eraser 'MoreRestrictiveInit' must have an initializer of the form 'init<T: 'E2'>(erasing: T)'}}
116
-
publicprotocolE2{}
110
+
@_typeEraser(FailableInit) // expected-error {{type eraser 'FailableInit' has no viable initializer of the form 'init<T: E2>(erasing: T)'}}
0 commit comments