Files
swift-mirror/test/decl/ext/Inputs/objc_implementation_swift_version.modulemap
Allan Shortlidge 51c0c8ec9a Sema: Check the availability of '@objc @implementation' extensions and members.
An '@objc @implementation' extension and its members have to be exactly as
available as the Objective-C declarations they implement. An implementation that
is less available than its interface cannot be allowed because that would admit
an availability checking soundness hole. An implementation that is more
available, on the other hand, is sound but is likely not what the developer
intended. For example, if the declaration in the header is marked as available
in a custom availability domain, then the developer likely expects the Swift
implementation to be compiled out when that domain is disabled at compile time.

Diagnose an extension that is less available than the '@interface' it
implements, and add a 'WrongAvailability' match outcome that diagnoses a member
whose availability differs from the declaration in the header in either
direction, offering a fix-it to add the necessary '@available' attribute when
the header is the more restrictive of the two.

Requirements that are unavailable in a platform or custom domain are no longer
skipped when matching, since they still exist in Objective-C and can be
implemented by an equally unavailable member. They don't require an
implementation, though, so they are ignored when diagnosing missing
implementations.

Resolves rdar://156564928.
2026-08-14 15:24:07 -07:00

5 lines
103 B
Plaintext

module objc_implementation_swift_version {
header "objc_implementation_swift_version.h"
export *
}