Skip to content

Commit ffbedef

Browse files
committed
Fix typos in code snippets
Technically `case some =>` works (and binds `some` to `this`) but I don't think this was intended.
1 parent dde9330 commit ffbedef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/blog/_posts/2018-03-05-seventh-dotty-milestone-release.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ object Option {
4747
def isDefined = false
4848
}
4949

50-
def apply[T(x: T): Option[T] = if (x == null) None else Some(x)
50+
def apply[T](x: T): Option[T] = if (x == null) None else Some(x)
5151
}
5252
```
5353

@@ -59,7 +59,7 @@ enum Option[+T] {
5959

6060
def isDefined: Boolean = this match {
6161
case None => false
62-
case some => true
62+
case Some(_) => true
6363
}
6464
}
6565

0 commit comments

Comments
 (0)