We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bbd0ff5 + 9b4c376 commit b66b8ddCopy full SHA for b66b8dd
docs/docs/reference/other-new-features/type-test.md
@@ -127,7 +127,7 @@ trait Peano:
127
val Succ: SuccExtractor
128
trait SuccExtractor:
129
def apply(nat: Nat): Succ
130
- def unapply(nat: Succ): Option[Nat]
+ def unapply(succ: Succ): Some[Nat]
131
132
given typeTestOfZero: TypeTest[Nat, Zero]
133
given typeTestOfSucc: TypeTest[Nat, Succ]
@@ -147,7 +147,7 @@ object PeanoInt extends Peano:
147
148
val Succ: SuccExtractor = new:
149
def apply(nat: Nat): Succ = nat + 1
150
- def unapply(nat: Succ) = Some(nat - 1)
+ def unapply(succ: Succ) = Some(succ - 1)
151
152
def typeTestOfZero: TypeTest[Nat, Zero] = new:
153
def unapply(x: Nat): Option[x.type & Zero] =
0 commit comments