Avatar
Avatar
kntk
@swift-main @swift-6.0.3 @swift-5.10.1 "-strict-concurrency=complete" class Repository { func doSomething() async { } } Task { @MainActor in let repository = Repository() await repository.doSomething() }
swift510 BOT 8/8/2024 1:58 PM
<stdin>:8:11: warning: passing argument of non-sendable type 'Repository' outside of main actor-isolated context may introduce data races await repository.doSomething() ^ <stdin>:1:7: note: class 'Repository' does not conform to the 'Sendable' protocol class Repository { ^