Ahh, of course! Without the changes from Closure isolation control, I have to be really careful about how isolation is inherited within that Task
.
Here's the solution:
func notOk(isolation: isolated (any Actor)? = #isolation) {
let op = {
print(self.value)
}
Task {
_ = isolation // this is critical to get the correct inheritance
op()
}
}