1// Checks that in Embedded Swift, we allow using stdlib types even when they
2// have declared availability to be higher than our macOS deployment target.
3
4// RUN: %target-typecheck-verify-swift -target arm64-apple-macos14 -enable-experimental-feature Embedded
5// RUN: %target-typecheck-verify-swift -target arm64-apple-macos15 -enable-experimental-feature Embedded
6// RUN: %target-typecheck-verify-swift -target x86_64-apple-macos14 -enable-experimental-feature Embedded -target-min-inlining-version min
7
8// REQUIRES: swift_in_compiler
9// REQUIRES: swift_feature_Embedded
10// REQUIRES: OS=macosx
11
12public protocol P { }
13struct S: P { }
14public enum E: Error { }
15
16public func f(_: Span<Int>) { } // Span is @available(SwiftStdlib 6.1, *)
17public func g(_: Int128) { } // Int128 is @available(SwiftStdlib 6.0, *)
18public func opaqueReturn() -> some P { return S() }
19public func asyncFunc() async { }
20public actor Actor { }
21public func variadicGeneric<each T>(_: repeat each T) { }
22public func typedThrow() throws(E) { }
23public struct ValueGeneric<let N: Int> { }
24