mirror of
https://github.com/apple/swift.git
synced 2026-10-18 17:49:23 +02:00
When printing a package interface, isPackage(Type) rejected any type that referenced a public decl, such as the public parent of a nested package protocol. Replace the boolean access helpers in ASTPrinter.cpp, and their copies in ModuleInterfaceSupport.cpp, with an interface visibility that is checked against the kind of interface being printed. A type's visibility is the most restrictive visibility of any decl it references, and `@_spi` decls are classified through the same mechanism. Synthesized conformances now go through the same filter, which fixes conformances that were dropped from package interfaces, such as the conformance of a package type to a package protocol inherited through an internal protocol. Resolves rdar://189824375.