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:
Alexis Laferrière
2025-10-01 13:57:36 -07:00
parent 1b086e1bfc
commit 0136e19dae
2 changed files with 5 additions and 1 deletions

View File

@@ -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()) {