Skip to content

Unresolvable diagnostics for access control on import specifiers #79176

@compnerd

Description

@compnerd

Description

It is impossible to reconcile the diagnostics emitted for access control on imports.

Reproduction

package import typealias SWLLBuild.llbuild_pid_t
public import typealias SWLLBuild.ProcessDelegate
@_exported public import struct SWBLLBuild.CommandExtendedResult

package class TaskProcessDelegate: ProcessDelegate {
  package func processStarted(pid: llbuild_pid_t?) {
  }
}

Expected behavior

You should be able to specify the minimally visible specifier for the types.

  1. Module 'SWBLLBuild' is imported as 'public' from the same file; this 'package' access level will be ignored
  2. Public import of 'SWBLLBuild' was not used in public declarations or inlinable code

Environment

swiftc -version
Swift version 6.2-dev (LLVM 6447c07cd7bd63f, Swift d9e07280e43d548)
Target: x86_64-unknown-windows-msvc

Additional information

No response

Metadata

Metadata

Assignees

Labels

access controlFeature → modifiers: Access control and access levelsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.importFeature → declarations: `import` declarations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions