Files
swift-mirror/test/Concurrency/LLDBDebuggerFunctionActorExtension.swift
Allan Shortlidge c02fc4724d Tests: Remove -disable-availability-checking from many Concurrency tests.
Instead, 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.
2024-10-18 16:21:51 -07:00

26 lines
810 B
Swift

// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -debugger-support %s -emit-sil -o /dev/null -verify
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
// REQUIRES: concurrency
// REQUIRES: asserts
// This test simulates LLDB's expression evaluator making an otherwise illegal
// synchronous call into an extension of an actor, as it would to run `p n` in
// this example.
actor A {
var n : Int = 0
}
extension A {
final func lldb_wrapped_expr() {
n = 1
}
}
@LLDBDebuggerFunction
func lldb_expr(a: A) {
a.lldb_wrapped_expr()
}