Avatar
@swift-main -strict-concurrency=complete struct S: Sendable { init() {} func foo() {} } class Runner { var a: S = S() func main() async throws { Task.detached { // (1) self.a.foo() } // (2) a = S() a.foo() } } try await Runner().main()