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
fileprivatetypealiasAssoc=Int // expected-error {{type alias 'Assoc' must be as accessible as its enclosing type because it matches a requirement in protocol 'AssocTypeProto'}} {{5-16=internal}}
Copy file name to clipboardExpand all lines: test/Sema/accessibility_private.swift
-21Lines changed: 0 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -210,24 +210,3 @@ fileprivate struct SR2579 {
210
210
privatevarouterProperty=Inner().innerProperty // expected-warning {{property should not be declared in this context because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
211
211
varouterProperty2=Inner().innerProperty // expected-warning {{property should be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
212
212
}
213
-
214
-
// FIXME: Dependent member lookup of typealiases is not subject
215
-
// to accessibility checking.
216
-
structGeneric<T>{
217
-
fileprivatetypealiasDependent=T
218
-
}
219
-
220
-
varx:Generic<Int>.Dependent=3
221
-
// expected-error@-1 {{variable must be declared private or fileprivate because its type uses a fileprivate type}}
publictypealiasElement=Sequence.Iterator.Element // expected-error {{type alias cannot be declared public because its underlying type uses an internal type}}
23
+
24
+
publicfunc next()->Element?{
25
+
returnnil
26
+
}
27
+
}
28
+
29
+
// FIXME: Dependent member lookup of typealiases is not subject
30
+
// to accessibility checking.
31
+
structGeneric<T>{
32
+
fileprivatetypealiasDependent=T
33
+
}
34
+
35
+
varx:Generic<Int>.Dependent=3 // expected-error {{variable must be declared private or fileprivate because its type uses a fileprivate type}}
36
+
37
+
func internalFuncWithFileprivateAlias()->Generic<Int>.Dependent{ // expected-error {{function must be declared private or fileprivate because its result uses a fileprivate type}}
0 commit comments