Files
swift-mirror/test/SILGen/global-actor.swift
Allan Shortlidge cb578172ea Tests: Remove -disable-availability-checking in more tests that use concurrency.
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.
2024-10-19 12:35:20 -07:00

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()
}