diff options
author | Daniel Barclay <dsbos@users.noreply.github.com> | 2016-11-17 02:05:59 -0500 |
---|---|---|
committer | Adriaan Moors <adriaan@lightbend.com> | 2016-11-16 23:05:59 -0800 |
commit | 73678d4dafe250f0b38df2e953787af26b1a4ee3 (patch) | |
tree | d78ba1dacca4442e670f48e3294b9bfbc0b6a8ca /spec/03-types.md | |
parent | 6b44da1454fa8cce63371c253bd884626249b043 (diff) | |
download | scala-73678d4dafe250f0b38df2e953787af26b1a4ee3.tar.gz scala-73678d4dafe250f0b38df2e953787af26b1a4ee3.tar.bz2 scala-73678d4dafe250f0b38df2e953787af26b1a4ee3.zip |
Add language to code blocks in spec (#5502)
* Add "scala" language code to pure-Scala code blocks.
* Add "java" language code to Java code block.
* Add "scala" language code to almost-pure-Scala code blocks.
Add "scala" language code to two code blocks whose content was Scala except
for containing ellipses (\ldots).
* Add "scala" language code to non-literal-Scala code blocks.
Add "scala" language code to code blocks that contain Scala but also special
elements, such as identifiers that are italicized or have prime marks (e.g., e′,
e′′), ellipses (\ldots), etc.
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 |