diff --git a/docs/docs/reference/erased-terms.md b/docs/docs/reference/erased-terms.md index 116236fafb9b..b171bc5df691 100644 --- a/docs/docs/reference/erased-terms.md +++ b/docs/docs/reference/erased-terms.md @@ -85,7 +85,7 @@ State machine with erased evidence example The following example is an extended implementation of a simple state machine which can be in a state `On` or `Off`. The machine can change state from `Off` to `On` with `turnedOn` only if it is currently `Off`, conversely from `On` to `Off` with `turnedOff` only if it is currently `On`. These last constraint are -captured with the `IsOff[S]` and `IsOn[S]` implicit evidence only exist for `IsOff[Off]` and `InOn[On]`. +captured with the `IsOff[S]` and `IsOn[S]` implicit evidence only exist for `IsOff[Off]` and `IsOn[On]`. For example, not allowing calling `turnedOff` on in an `Off` state as we would require an evidence `IsOn[Off]` that will not be found. @@ -112,7 +112,7 @@ object IsOff { @implicitNotFound("State is must be On") class IsOn[S <: State] object IsOn { - // def isOn will not exist at runtime, the compiler will only require that this evidence exists at compile time + // erased val isOn will not exist at runtime, the compiler will only require that this evidence exists at compile time erased implicit val isOn: IsOn[On] = new IsOn[On] }