Skip to content

fixed typo from InOn[On] to isOn[On] #4963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/reference/erased-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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]
}

Expand Down