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/Sema/accessibility_private.swift
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -207,13 +207,14 @@ extension Container {
207
207
fileprivateclassPrivateGenericUser<T>where T:PrivateInnerClass{} // expected-error {{generic class cannot be declared fileprivate because its generic requirement uses a private type}} {{none}}
208
208
}
209
209
210
-
fileprivatestructSR2579{
210
+
// https://github.com/apple/swift/issues/45184
211
+
fileprivatestructC_45184{
211
212
privatestructInner{
212
213
privatestructInnerPrivateType{}
213
-
varinnerProperty=InnerPrivateType() // expected-error {{property must be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
214
+
varinnerProperty=InnerPrivateType() // expected-error {{property must be declared private because its type 'C_45184.Inner.InnerPrivateType' uses a private type}}
214
215
}
215
216
// FIXME: We need better errors when one access violation results in more
216
217
// downstream.
217
-
privatevarouterProperty=Inner().innerProperty // expected-error {{property cannot be declared in this context because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
218
-
varouterProperty2=Inner().innerProperty // expected-error {{property must be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
218
+
privatevarouterProperty=Inner().innerProperty // expected-error {{property cannot be declared in this context because its type 'C_45184.Inner.InnerPrivateType' uses a private type}}
219
+
varouterProperty2=Inner().innerProperty // expected-error {{property must be declared private because its type 'C_45184.Inner.InnerPrivateType' uses a private type}}
0 commit comments