Files
swift-mirror/test/Concurrency/LLDBDebuggerFunctionActorExtension.swift
Michael Gottesman b3e837c16c [region-isolation] Enable region isolation by default with strict-concurrency.
I added a disable flag -disable-region-based-isolation-with-strict-concurrency
so that we do not need to update the current tests. It is only available when
asserts are enabled to ensure users cannot use it.

rdar://125918028
2024-04-04 13:07:32 -07:00

27 lines
995 B
Swift

// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -disable-region-based-isolation-with-strict-concurrency
// RUN: %target-swift-frontend -disable-availability-checking -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()
}