@@ -93,15 +93,18 @@ extension B: main::Equatable {
93
93
// FIXME incorrect: expected-error@-3 {{variable used within its own initial value}}
94
94
95
95
if main: : Bool. main : : rando m( ) {
96
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'main::Bool'}}
96
+ // expected-error@-1 {{declaration 'Bool' is not imported through module 'main'}}
97
+ // expected-note@-2 {{did you mean module 'Swift'?}} {{8-12=Swift}}
97
98
98
99
main: : negate( )
99
- // FIXME improve, suggest adding 'self.': expected-error@-1 {{use of unresolved identifier 'main::negate'}}
100
+ // expected-error@-1 {{declaration 'negate' is not imported through module 'main'}}
101
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{7-11=self.ModuleSelectorTestingKit}}
100
102
}
101
103
else {
102
104
self = main: : B( value: . main: : min)
103
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'main::B'}}
104
- // expected-error@-2 {{cannot infer contextual base in reference to member 'main::min'}}
105
+ // expected-error@-1 {{declaration 'B' is not imported through module 'main'}}
106
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{14-18=ModuleSelectorTestingKit}}
107
+ // expected-error@-3 {{cannot infer contextual base in reference to member 'main::min'}}
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)
@@ -205,12 +210,14 @@ extension D: @retroactive 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: . Swift: : min)
212
- // FIXME improve: expected-error@-1 {{use of unresolved identifier 'Swift::D'}}
213
- // expected-error@-2 {{cannot infer contextual base in reference to member 'Swift::min'}}
218
+ // expected-error@-1 {{declaration 'D' is not imported through module 'Swift'}}
219
+ // expected-note@-2 {{did you mean module 'ModuleSelectorTestingKit'?}} {{14-19=ModuleSelectorTestingKit}}
220
+ // expected-error@-3 {{cannot infer contextual base in reference to member 'Swift::min'}}
214
221
}
215
222
216
223
self . Swift : : myNegate( )
@@ -315,10 +322,10 @@ func main::decl1(
315
322
// expected-error@-2 {{name of constant declaration cannot be qualified with module selector}}
316
323
317
324
// From uses in the switch statements below:
318
- // expected-note@-5 3{{did you mean 'decl1g' ?}}
325
+ // expected-note@-5 3{{did you mean the local declaration ?}}
319
326
320
327
switch Optional ( main: : decl1g) {
321
- // expected-error@-1 {{use of unresolved identifier 'main::decl1g '}}
328
+ // expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
322
329
case Optional . some( let main: : decl1i) :
323
330
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}
324
331
break
@@ -327,7 +334,7 @@ func main::decl1(
327
334
}
328
335
329
336
switch Optional ( main: : decl1g) {
330
- // expected-error@-1 {{use of unresolved identifier 'main::decl1g '}}
337
+ // expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
331
338
case let Optional . some( main: : decl1j) :
332
339
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}
333
340
break
@@ -336,7 +343,7 @@ func main::decl1(
336
343
}
337
344
338
345
switch Optional ( main: : decl1g) {
339
- // expected-error@-1 {{use of unresolved identifier 'main::decl1g '}}
346
+ // expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
340
347
case let main: : decl1k? :
341
348
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}
342
349
break
0 commit comments