@@ -15,7 +15,7 @@ class Container {
15
15
_ = self . bar
16
16
self . bar = 5
17
17
18
- privateExtensionMethod ( ) // FIXME expected-error {{use of unresolved identifier 'privateExtensionMethod' }}
18
+ privateExtensionMethod ( ) // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level }}
19
19
self . privateExtensionMethod ( ) // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
20
20
21
21
_ = PrivateInner ( )
@@ -54,23 +54,23 @@ extension Container {
54
54
private func privateExtensionMethod( ) { } // expected-note * {{declared here}}
55
55
56
56
func extensionTest( ) {
57
- foo ( ) // FIXME expected-error {{use of unresolved identifier 'foo' }}
57
+ foo ( ) // expected-error {{'foo' is inaccessible due to 'private' protection level }}
58
58
self . foo ( ) // expected-error {{'foo' is inaccessible due to 'private' protection level}}
59
59
60
- _ = bar // FIXME expected-error {{use of unresolved identifier 'bar' }}
61
- bar = 5 // FIXME expected-error {{use of unresolved identifier 'bar' }}
60
+ _ = bar // expected-error {{'bar' is inaccessible due to 'private' protection level }}
61
+ bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level }}
62
62
_ = self . bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
63
63
self . bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
64
64
65
65
privateExtensionMethod ( )
66
66
self . privateExtensionMethod ( )
67
67
68
- _ = PrivateInner ( ) // FIXME expected-error {{use of unresolved identifier 'PrivateInner' }}
68
+ _ = PrivateInner ( ) // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level }}
69
69
_ = Container . PrivateInner ( ) // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
70
70
}
71
71
72
72
// FIXME: Why do these errors happen twice?
73
- var extensionInner : PrivateInner ? { return nil } // FIXME expected-error 2 {{use of undeclared type 'PrivateInner' }}
73
+ var extensionInner : PrivateInner ? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level }}
74
74
var extensionInnerQualified : Container . PrivateInner ? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
75
75
}
76
76
@@ -81,33 +81,35 @@ extension Container.Inner {
81
81
obj. bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
82
82
obj. privateExtensionMethod ( ) // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
83
83
84
- _ = PrivateInner ( ) // FIXME expected-error {{use of unresolved identifier 'PrivateInner'}}
84
+ // FIXME: Unqualified lookup won't look into Container from here.
85
+ _ = PrivateInner ( ) // expected-error {{use of unresolved identifier 'PrivateInner'}}
85
86
_ = Container . PrivateInner ( ) // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
86
87
}
87
88
88
89
// FIXME: Why do these errors happen twice?
89
- var inner : PrivateInner ? { return nil } // FIXME expected-error 2 {{use of undeclared type 'PrivateInner'}}
90
+ // FIXME: Unqualified lookup won't look into Container from here.
91
+ var inner : PrivateInner ? { return nil } // expected-error 2 {{use of undeclared type 'PrivateInner'}}
90
92
var innerQualified : Container . PrivateInner ? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
91
93
}
92
94
93
95
class Sub : Container {
94
96
func subTest( ) {
95
- foo ( ) // FIXME expected-error {{use of unresolved identifier 'foo' }}
97
+ foo ( ) // expected-error {{'foo' is inaccessible due to 'private' protection level }}
96
98
self . foo ( ) // expected-error {{'foo' is inaccessible due to 'private' protection level}}
97
99
98
- _ = bar // FIXME expected-error {{use of unresolved identifier 'bar' }}
99
- bar = 5 // FIXME expected-error {{use of unresolved identifier 'bar' }}
100
+ _ = bar // expected-error {{'bar' is inaccessible due to 'private' protection level }}
101
+ bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level }}
100
102
_ = self . bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
101
103
self . bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
102
104
103
- privateExtensionMethod ( ) // FIXME expected-error {{use of unresolved identifier 'privateExtensionMethod' }}
105
+ privateExtensionMethod ( ) // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level }}
104
106
self . privateExtensionMethod ( ) // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
105
107
106
- _ = PrivateInner ( ) // FIXME expected-error {{use of unresolved identifier 'PrivateInner' }}
108
+ _ = PrivateInner ( ) // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level }}
107
109
_ = Container . PrivateInner ( ) // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
108
110
}
109
111
110
- var subInner : PrivateInner ? // FIXME expected-error {{use of undeclared type 'PrivateInner' }}
112
+ var subInner : PrivateInner ? // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level }}
111
113
var subInnerQualified : Container . PrivateInner ? // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
112
114
}
113
115
@@ -154,9 +156,9 @@ extension Container {
154
156
}
155
157
extension Container {
156
158
func test( ) {
157
- let a : ExtensionConflictingType ? = nil // FIXME expected-error {{use of undeclared type 'ExtensionConflictingType' }}
159
+ let a : ExtensionConflictingType ? = nil // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level }}
158
160
let b : Container . ExtensionConflictingType ? = nil // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
159
- _ = ExtensionConflictingType ( ) // FIXME expected-error {{use of unresolved identifier 'ExtensionConflictingType' }}
161
+ _ = ExtensionConflictingType ( ) // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level }}
160
162
_ = Container . ExtensionConflictingType ( ) // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
161
163
}
162
164
}
0 commit comments