diff options
Diffstat (limited to 'spec/03-types.md')
-rw-r--r-- | spec/03-types.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/03-types.md b/spec/03-types.md index 2ad16e50cb..d2f41daabf 100644 --- a/spec/03-types.md +++ b/spec/03-types.md @@ -587,7 +587,7 @@ corresponding function type. The declarations -``` +```scala def a: Int def b (x: Int): Boolean def c (x: Int) (y: String, z: String): String @@ -642,7 +642,7 @@ the corresponding type parameter clause. Consider this fragment of the `Iterable[+X]` class: -``` +```scala trait Iterable[+X] { def flatMap[newType[+X] <: Iterable[X], S](f: X => newType[S]): newType[S] } @@ -660,7 +660,7 @@ same name, we model An overloaded type consisting of type alternatives $T_1 \commadots T_n (n \geq 2)$ is denoted internally $T_1 \overload \ldots \overload T_n$. ###### Example -``` +```scala def println: Unit def println(s: String): Unit = $\ldots$ def println(x: Float): Unit = $\ldots$ @@ -678,7 +678,7 @@ println: => Unit $\overload$ ``` ###### Example -``` +```scala def f(x: T): T = $\ldots$ val f = 0 ``` @@ -979,7 +979,7 @@ after applying [eta-expansion](06-expressions.html#eta-expansion). If $T$ is a m Given the definitions -``` +```scala def foo(x: Int => String): Unit def foo(x: ToString): Unit |