mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A `@backDeployed` function printed in a `.swiftinterface` must have a function body so that SILGen can emit a fallback copy to call when the back deployed function is unavailable. Previously, the compiler would crash in SILGen when compiling an interface containing a back deployed function without a body. Resolves rdar://141593108.
17 lines
510 B
Plaintext
17 lines
510 B
Plaintext
// swift-interface-format-version: 1.0
|
|
// swift-module-flags:
|
|
|
|
// RUN: %target-swift-typecheck-module-from-interface(%s) -module-name Test
|
|
// REQUIRES: OS=macosx
|
|
|
|
// Since the following declarations are only back deployed on iOS, their bodies
|
|
// should be missing in a `.swiftinterface` compiled for macOS
|
|
|
|
@available(iOS 17.4, *)
|
|
@backDeployed(before: iOS 18.0)
|
|
public func backDeployedFuncOniOSWithoutBody()
|
|
|
|
@available(iOS 17.4, *)
|
|
@backDeployed(before: iOS 18.0)
|
|
public var backDeployedVarWithoutBody: Int
|