@@ -94,14 +94,17 @@ extension B: main::Equatable {
94
94
// FIXME incorrect: expected-error@-3 {{variable used within its own initial value}}
95
95
96
96
if main: : Bool. main : : rando m( ) {
97
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'main::Bool'}}
97
+ // expected-error@-1 {{declaration 'Bool' is not imported through module 'main'}}
98
+ // expected-note@-2 {{did you mean module 'Swift'?}} {{8-12=Swift}}
98
99
99
100
main: : negate( )
100
- // FIXME improve, suggest adding 'self.': expected-error@-1 {{use of unresolved identifier 'main::negate'}}
101
+ // expected-error@-1 {{declaration 'negate' is not imported through module 'main'}}
102
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{7-11=self.ModuleSelectorTestingKit}}
101
103
}
102
104
else {
103
105
self = main: : B( value: . main: : min)
104
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'main::B'}}
106
+ // expected-error@-1 {{declaration 'B' is not imported through module 'main'}}
107
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{14-18=ModuleSelectorTestingKit}}
105
108
}
106
109
107
110
self . main : : myNegate( )
@@ -152,10 +155,12 @@ extension ModuleSelectorTestingKit::C: ModuleSelectorTestingKit::Equatable {
152
155
// FIXME incorrect: expected-error@-3 {{variable used within its own initial value}}
153
156
154
157
if ModuleSelectorTestingKit : : Bool. ModuleSelectorTestingKit : : rando m( ) {
155
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'ModuleSelectorTestingKit::Bool'}}
158
+ // expected-error@-1 {{declaration 'Bool' is not imported through module 'ModuleSelectorTestingKit'}}
159
+ // expected-note@-2 {{did you mean module 'Swift'?}} {{8-31=Swift}}
156
160
157
161
ModuleSelectorTestingKit: : negate( )
158
- // FIXME improve, suggest adding 'self.': expected-error@-1 {{use of unresolved identifier 'ModuleSelectorTestingKit::negate'}}
162
+ // expected-error@-1 {{declaration 'negate' is not imported through module 'ModuleSelectorTestingKit'}}
163
+ // expected-note@-2 {{did you mean the member of 'self'?}} {{7-7=self.}}
159
164
}
160
165
else {
161
166
self = ModuleSelectorTestingKit : : C( value: . ModuleSelectorTestingKit: : min)
@@ -176,7 +181,7 @@ extension Swift::D {}
176
181
// expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{11-16=ModuleSelectorTestingKit}}
177
182
178
183
extension D : Swift : : Equatable {
179
- // FIXME wat: expected-error@-1 2 {{implementation of 'Equatable' cannot be automatically synthesized in an extension in a different file to the type}}
184
+ // FIXME wat: expected-error@-1 {{implementation of 'Equatable' cannot be automatically synthesized in an extension in a different file to the type}}
180
185
181
186
@_implements ( Swift: : Equatable, Swift: : == ( _: _: ) )
182
187
// expected-error@-1 {{name cannot be qualified with module selector here}} {{34-41=}}
@@ -205,11 +210,13 @@ extension D: Swift::Equatable {
205
210
// FIXME: expected-error@-2 {{variable used within its own initial value}}
206
211
if Swift : : Bool. Swift : : rando m( ) {
207
212
Swift: : negate( )
208
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'Swift::negate'}}
213
+ // expected-error@-1 {{declaration 'negate' is not imported through module 'Swift'}}
214
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{7-12=self.ModuleSelectorTestingKit}}
209
215
}
210
216
else {
211
217
self = Swift: : D( value: . ModuleSelectorTestingKit: : min)
212
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'Swift::D'}}
218
+ // expected-error@-1 {{declaration 'D' is not imported through module 'Swift'}}
219
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{14-19=ModuleSelectorTestingKit}}
213
220
}
214
221
215
222
self . Swift : : myNegate( )
@@ -314,10 +321,10 @@ func main::decl1(
314
321
// expected-error@-2 {{name of constant declaration cannot be qualified with module selector}}
315
322
316
323
// From uses in the switch statements below:
317
- // expected-note@-5 3{{did you mean 'decl1g' ?}}
324
+ // expected-note@-5 3{{did you mean the local declaration ?}}
318
325
319
326
switch Optional ( main: : decl1g) {
320
- // expected-error@-1 {{use of unresolved identifier 'main::decl1g '}}
327
+ // expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
321
328
case Optional . some( let main: : decl1i) :
322
329
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}
323
330
break
@@ -326,7 +333,7 @@ func main::decl1(
326
333
}
327
334
328
335
switch Optional ( main: : decl1g) {
329
- // expected-error@-1 {{use of unresolved identifier 'main::decl1g '}}
336
+ // expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
330
337
case let Optional . some( main: : decl1j) :
331
338
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}
332
339
break
@@ -335,7 +342,7 @@ func main::decl1(
335
342
}
336
343
337
344
switch Optional ( main: : decl1g) {
338
- // expected-error@-1 {{use of unresolved identifier 'main::decl1g '}}
345
+ // expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
339
346
case let main: : decl1k? :
340
347
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}
341
348
break
0 commit comments