Sending values across actors
When you hand a value from one actor to another, the compiler needs a promise that no one
else can mutate it along the way. In Swift 6 that promise is the Sendable
protocol — and the checker is on by default.
Why the compiler cares
A data race is two tasks touching the same memory at once, with at least one writing.
Actors serialize access to their own state, but the moment a reference type
crosses an actor boundary, both sides could hold it. Sendable is how you prove
that can't cause a race.
Your turn
The Ledger actor on the right won't compile: Entry is a class being
sent into the actor. Make Entry safe to send, then run the hidden tests.
Hint available in the Tutor panel — try it yourself first.