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
// expected-error@-1 {{name in constant declaration cannot be qualified with a module selector}} expected-note@-1 {{remove module selector from this name}} {{14-20=}}
348
360
// expected-error@-2 {{name in constant declaration cannot be qualified with a module selector}} expected-note@-2 {{remove module selector from this name}} {{28-34=}}
361
+
// From uses in the switch statements below: expected-note@-3 3 {{did you mean the local declaration?}}
349
362
350
363
switch Optional(main::decl1g){
351
-
// expected-error@-1 {{cannot find 'main::decl1g' in scope}}
364
+
// expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
352
365
case Optional.some(let main::decl1i):
353
366
// expected-error@-1 {{name in constant declaration cannot be qualified with a module selector}} expected-note@-1 {{remove module selector from this name}} {{26-32=}}
354
367
break
@@ -357,7 +370,7 @@ func main::decl1(
357
370
}
358
371
359
372
switch Optional(main::decl1g){
360
-
// expected-error@-1 {{cannot find 'main::decl1g' in scope}}
373
+
// expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
361
374
case let Optional.some(main::decl1j):
362
375
// expected-error@-1 {{name in constant declaration cannot be qualified with a module selector}} expected-note@-1 {{remove module selector from this name}} {{26-32=}}
363
376
break
@@ -366,7 +379,7 @@ func main::decl1(
366
379
}
367
380
368
381
switch Optional(main::decl1g){
369
-
// expected-error@-1 {{cannot find 'main::decl1g' in scope}}
382
+
// expected-error@-1 {{declaration 'decl1g' is not imported through module 'main'}}
370
383
case let main::decl1k?:
371
384
// expected-error@-1 {{name in constant declaration cannot be qualified with a module selector}} expected-note@-1 {{remove module selector from this name}} {{11-17=}}
372
385
break
@@ -472,7 +485,9 @@ precedencegroup main::PG1 {
472
485
473
486
func badModuleNames(){
474
487
NonexistentModule::print()
475
-
// expected-error@-1 {{cannot find 'NonexistentModule::print' in scope}}
488
+
// expected-error@-1 {{declaration 'print' is not imported through module 'NonexistentModule'}}
489
+
// expected-note@-2 {{did you mean module 'Swift'?}} {{3-20=Swift}}
490
+
// FIXME redundant: expected-note@-3 {{did you mean module 'Swift'?}}
476
491
477
492
_ ="foo".NonexistentModule::count
478
493
// FIXME improve: expected-error@-1 {{value of type 'String' has no member 'NonexistentModule::count'}}
0 commit comments