Avatar
@swift-6.0-dev @swift-main -swift-version 6 class Repository { var value: Int = 0 func doSomething() async { value += 1 } } let task = Task { @MainActor in let repository = Repository() async let x: Void = repository.doSomething() repository.value += 1 await x print(repository.value) } await task.value (edited)