File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -2507,15 +2507,9 @@ void swift::recordRequiredImportAccessLevelForDecl(
2507
2507
if (definingModule == dc->getParentModule ())
2508
2508
return ;
2509
2509
2510
- sf->registerRequiredAccessLevelForModule (definingModule, accessLevel);
2511
-
2512
2510
if (auto attributedImport = sf->getImportAccessLevel (definingModule)) {
2513
2511
auto importedModule = attributedImport->module .importedModule ;
2514
-
2515
- // If the defining module is transitively imported, mark the responsible
2516
- // module as requiring the minimum access level too.
2517
- if (importedModule != definingModule)
2518
- sf->registerRequiredAccessLevelForModule (importedModule, accessLevel);
2512
+ sf->registerRequiredAccessLevelForModule (importedModule, accessLevel);
2519
2513
2520
2514
if (dc->getASTContext ().LangOpts .EnableModuleApiImportRemarks )
2521
2515
remark (*attributedImport);
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public func useTypesC(a: FarClangType) {}
133
133
//--- ExportedClient_FileA.swift
134
134
/// Prefer the defining module.
135
135
public import NotLib // expected-warning {{public import of 'NotLib' was not used in public declarations or inlinable code}}
136
- public import LibCore
136
+ public import LibCore // expected-warning {{public import of 'LibCore' was not used in public declarations or inlinable code}}
137
137
public import Lib
138
138
139
139
public func useTypesA( a: ExportedType ) { }
@@ -162,7 +162,7 @@ public func useTypesD(a: ExportedType) {}
162
162
163
163
//--- SwiftLibClient_FileA.swift
164
164
/// Prefer the import matching public-module-name.
165
- public import SwiftPublicNameCore
165
+ public import SwiftPublicNameCore // expected-warning {{public import of 'SwiftPublicNameCore' was not used in public declarations or inlinable code}}
166
166
public import SwiftPublicName
167
167
168
168
public func useTypesA( a: SwiftStruct ) { }
You can’t perform that action at this time.
0 commit comments