Skip to content

Commit dc371fb

Browse files
committed
Sema: Reference InternalImportsByDefault as being an upcoming feature
1 parent 34d94a6 commit dc371fb

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3679,7 +3679,8 @@ ERROR(inconsistent_implicit_access_level_on_import,none,
36793679
"'%select{private|fileprivate|internal|package|public|%error}1' elsewhere",
36803680
(Identifier, AccessLevel))
36813681
NOTE(inconsistent_implicit_access_level_on_import_silence,none,
3682-
"silence these warnings by adopting 'InternalImportsByDefault'",
3682+
"silence these warnings by adopting the upcoming feature "
3683+
"'InternalImportsByDefault'",
36833684
())
36843685
NOTE(inconsistent_implicit_access_level_on_import_here,none,
36853686
"imported "

test/Sema/access-level-import-inconsistencies.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ private import Lib
4949
// RUN: -primary-file %t/ManyFiles_ImplicitVsInternal_FileA.swift -verify
5050
//--- ManyFiles_ImplicitVsInternal_FileA.swift
5151
import Lib // expected-error {{ambiguous implicit access level for import of 'Lib'; it is imported as 'internal' elsewhere}}
52-
// expected-note @-1 {{silence these warnings by adopting 'InternalImportsByDefault'}}
52+
// expected-note @-1 {{silence these warnings by adopting the upcoming feature 'InternalImportsByDefault'}}
5353
//--- ManyFiles_ImplicitVsInternal_FileB.swift
5454
internal import Lib // expected-note {{imported 'internal' here}}
5555

5656
// RUN: %target-swift-frontend -typecheck %t/ManyFiles_ImplicitVsPackage_FileB.swift -I %t \
5757
// RUN: -primary-file %t/ManyFiles_ImplicitVsPackage_FileA.swift -verify
5858
//--- ManyFiles_ImplicitVsPackage_FileA.swift
5959
import Lib // expected-error {{ambiguous implicit access level for import of 'Lib'; it is imported as 'package' elsewhere}}
60-
// expected-note @-1 {{silence these warnings by adopting 'InternalImportsByDefault'}}
60+
// expected-note @-1 {{silence these warnings by adopting the upcoming feature 'InternalImportsByDefault'}}
6161
//--- ManyFiles_ImplicitVsPackage_FileB.swift
6262
package import Lib // expected-note {{imported 'package' here}} @:1
6363

test/Sema/access-level-import-inconsistent-same-file.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public func dummyAPI(t1: Lib1.Type1, t2: Lib2.Type1, t3: Lib3.Type1) {}
5757
/// Simple public vs internal, imports defaults to public.
5858
import Lib1 // expected-note {{imported 'public' here}}
5959
// expected-error @-1 {{ambiguous implicit access level for import of 'Lib1'; it is imported as 'internal' elsewhere}}
60-
// expected-note @-2 {{silence these warnings by adopting 'InternalImportsByDefault'}}
60+
// expected-note @-2 {{silence these warnings by adopting the upcoming feature 'InternalImportsByDefault'}}
6161
internal import Lib1 // expected-warning {{module 'Lib1' is imported as 'public' from the same file; this 'internal' access level will be ignored}}
6262
// expected-note @-1 {{imported 'internal' here}}
6363

@@ -66,7 +66,7 @@ public import Lib2
6666
// expected-note @-1 {{imported 'public' here}}
6767
import Lib2
6868
// expected-error @-1 {{ambiguous implicit access level for import of 'Lib2'; it is imported as 'public' elsewhere}}
69-
// expected-note @-2 {{silence these warnings by adopting 'InternalImportsByDefault'}}
69+
// expected-note @-2 {{silence these warnings by adopting the upcoming feature 'InternalImportsByDefault'}}
7070

7171
public func dummyAPI(t: Lib1.Type1, t2: Lib2.Type1) {}
7272

test/Sema/superfluously-public-imports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public struct Extended {
124124
//--- Client_Swift5.swift
125125
/// No diagnostics should be raised on the implicit access level.
126126
import UnusedImport // expected-error {{ambiguous implicit access level for import of 'UnusedImport'; it is imported as 'public' elsewhere}}
127-
// expected-note @-1 {{silence these warnings by adopting 'InternalImportsByDefault'}}
127+
// expected-note @-1 {{silence these warnings by adopting the upcoming feature 'InternalImportsByDefault'}}
128128
public import UnusedImport // expected-warning {{public import of 'UnusedImport' was not used in public declarations or inlinable code}} {{1-7=internal}}
129129
// expected-note @-1 {{imported 'public' here}}
130130

0 commit comments

Comments
 (0)