mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Allow availability macros in embedded code
Availability macros are rejected from library-evolution inlinable code as the compiler didn't know how to print them in the swiftinterface. This isn't a concern with the embedded style of fragile functions, we can allow availability macros there.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -verify %s -I %t \
|
||||
// RUN: -swift-version 5 -target arm64-apple-macosx15.0 \
|
||||
// RUN: -define-availability "availMacro:macOS 26.0, iOS 26.0" \
|
||||
// RUN: -enable-experimental-feature Embedded
|
||||
|
||||
// REQUIRES: swift_feature_Embedded
|
||||
@@ -73,6 +74,8 @@ public func implicitlyInlinablePublic(arg: StructFromDirect = StructFromDirect()
|
||||
implicitlyInlinablePublic()
|
||||
implicitlyInlinablePrivate()
|
||||
explicitNonInliable()
|
||||
|
||||
if #available(availMacro, *) { }
|
||||
}
|
||||
|
||||
private func implicitlyInlinablePrivate(arg: StructFromDirect = StructFromDirect()) {
|
||||
|
||||
Reference in New Issue
Block a user