Commit Graph

4 Commits

Author SHA1 Message Date
Allan Shortlidge
7e6e8ed7b5 Sema: Fully check the availability of wrappedValue.
Call `checkDeclarationAvailability()`, instead of just diagnosing
unavailability.
2024-10-25 16:50:20 -07:00
Alexis Laferrière
bc4efe518f [Sema] Always error on public uses of conformance from @_spiOnly import 2022-09-09 09:50:56 -07:00
Alexis Laferrière
d1e36b0a12 [Sema|lit] Intro lit substitution for generating the 2 swiftinterfaces
Intro the lit substitution
`%target-swift-emit-module-interfaces(Main.swiftinterface,
Main.private.swiftinterface` to generate both the public and private
swiftinterface. And use it in spi-only-import-exportability.swift.

To verify the generated interfaces I would recommend to keep two calls
to `%target-swift-typecheck-module-from-interface` as each is a
different invocation likely to fail.
2022-09-09 09:20:51 -07:00
Alexis Laferrière
6d396b4834 [Sema] Check @_spiOnly imported decls exportability
Decls imported via an @_spiOnly import can only be used in @_spi decls
signatures, internal decl signatures and non-inlinable function bodies.
2022-09-09 09:20:51 -07:00