Commit Graph

7 Commits

Author SHA1 Message Date
Allan Shortlidge
49b59f69c9 Revert https://github.com/swiftlang/swift/pull/75745.
Finishes resolving rdar://139236053.
2024-11-05 14:37:56 -08:00
Ellie Shin
dc1c34dfa1 [Sema] Treat @usableFromInline package decls from interface as public and skip access checks
Resolves rdar://133319906
2024-08-13 17:01:19 -07:00
Ellie Shin
7c80976081 Package name is only printed in private swiftinterface. This causes
ambiguity during lookup when there are multiple public or inlinalbe
package decls in public interfaces. This PR adds a package name to
public swiftinterface and lets typecheck look up the package name
to narrow down the scope of access to package decls from an external
module.

Resolves rdar://117699160
2023-10-30 13:38:17 -07:00
Ellie Shin
f019dc0306 Update test 2023-10-03 16:17:59 -07:00
Ellie Shin
67842e3751 Grant access to inlinalbe package symbols referenced in interfaces.
Package decls are only printed in interface files if they are inlinable
(@usableFromInline, @inlinable, @_alwaysEmitIntoClient). They could be
referenced by a module outside of its defining module that belong to the same
package determined by the `package-name` flag. However, the flag is only in
.swiftmodule and .private.swiftinterface, thus type checking references of
inlinable package symbols in public interfaces fails due to the missing flag.
Instead of adding the package-name flag to the public interfaces, which
could raise a security concern, this PR grants access to such cases.

Resolves rdar://116142791
2023-10-03 16:14:15 -07:00
Ellie Shin
e6bc110db0 Move -NOT to the beginning in tests 2023-04-27 16:40:20 -07:00
Ellie Shin
b081404daa Print package-name in .private.swiftinterface only for better abstraction
Resolves rdar://107638447
2023-04-20 17:45:22 -07:00