Avatar
Avatar
Iceman
@swift-6.0.3 @MainActor enum Hoge { static let count = 10 } func p2(isolation: isolated (any Actor)? = #isolation, body: () async -> Void) async { await body() } func p(isolation: isolated (any Actor)? = #isolation, body: () -> Void) async { await p2(isolation: isolation) { body() } } await Task { @MainActor in await p { print(Hoge.count) MainActor.shared.assertIsolated() } }.value
signal: trace/breakpoint trap (core dumped) with stderr: #0 0x0000b11b28f6bf9c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/swift-frontend+0x5edbf9c) #1 0x0000b11b28f6a1a8 llvm::sys::RunSignalHandlers() (/usr/bin/swift-frontend+0x5eda1a8) #2 0x0000b11b28f6c6a0 SignalHandler(int) Signals.cpp:0:0
4.48 KB
👀 1