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
This would just set the NominalTypeDecl's declared type to
ErrorType, which caused problems elsewhere.
Instead, generalize the logic used for AbstractFunctionDecl.
This correctly wires up the GenericTypeParamDecl's archetypes even
if the signature didn't validate, fixing crashes if the generic
parameters of the type are referenced.
Copy file name to clipboardExpand all lines: test/Sema/accessibility.swift
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,7 @@ struct DefaultGeneric<T> {}
309
309
structDefaultGenericPrivate<T:PrivateProto>{} // expected-error {{generic struct must be declared private because its generic parameter uses a private type}}
310
310
structDefaultGenericPrivate2<T:PrivateClass>{} // expected-error {{generic struct must be declared private because its generic parameter uses a private type}}
311
311
structDefaultGenericPrivateReq<T where T ==PrivateClass>{} // expected-error {{same-type requirement makes generic parameter 'T' non-generic}}
312
+
// expected-error@-1 {{generic struct must be declared private because its generic requirement uses a private type}}
312
313
structDefaultGenericPrivateReq2<T where T:PrivateProto>{} // expected-error {{generic struct must be declared private because its generic requirement uses a private type}}
313
314
314
315
publicstructPublicGenericInternal<T:InternalProto>{} // expected-error {{generic struct cannot be declared public because its generic parameter uses an internal type}}
0 commit comments