mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use the `%target-swift-5.1-abi-triple` substitution to compile the tests for deployment to the minimum OS versions required for use of _Concurrency APIs, instead of disabling availability checking.
27 lines
1.0 KiB
Swift
27 lines
1.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// REQUIRES: concurrency
|
|
|
|
import MeowActor
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@MeowActor func doMeow() {}
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
@HissActor func doHiss() {}
|
|
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -enable-library-evolution -emit-module -o %t/MeowActor.swiftmodule %S/Inputs/MeowActor.swift
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-silgen %s -I %t | %FileCheck --check-prefix CHECK-RESILIENT %s
|
|
// CHECK-RESILIENT: metatype $@thick MeowActor.Type
|
|
// CHECK-RESILIENT: metatype $@thick HissActor.Type
|
|
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-module -o %t/MeowActor.swiftmodule %S/Inputs/MeowActor.swift
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-silgen %s -I %t | %FileCheck --check-prefix CHECK-FRAGILE %s
|
|
// CHECK-FRAGILE: metatype $@thin MeowActor.Type
|
|
// CHECK-FRAGILE: metatype $@thin HissActor.Type
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
func someFunc() async {
|
|
await doMeow()
|
|
await doHiss()
|
|
}
|