Commit Graph

4 Commits

Author SHA1 Message Date
Xi Ge
6f5b40543d Revert "Handle package exportability."
This reverts commit d182d01c28.
2024-06-11 11:54:00 -07:00
Ellie Shin
d182d01c28 Handle package exportability.
This PR treats package access level as exportable, preventing
internally imported types from accidentally being declared in
package decl signatures.

Added package-specific cases to ExportabilityReason and
DisallowedOriginKind to track the validity of imported types
at use sites with package access scope. Added tests to cover
variety of use cases.

Resolves rdar://117586046&125050064&124484388&124306642
2024-05-02 05:17:03 -07:00
Ellie Shin
ef321c9fd2 Allow @usableFromInline and @inlinable to package decls
Add tests for packgae inline
Add more package acl tests

Resolves rdar://104617133
2023-03-16 11:21:11 -07:00
Slava Pestov
0dffe5c348 Sema: Use VarDecl::isLayoutExposedToClients() when checking access in @frozen structs
We require that all stored properties in a @frozen struct have
public or @usableFromInline types, even if the property itself
is not public. This is so that clients can correctly generate
code to manipulate the @frozen struct.

This check was only looking for bona-fide stored properties,
and missing out looking at properties that have backing storage,
namely 'lazy' properties and property wrappers.
2020-10-22 01:11:46 -04:00