Skip to content

Commit ee9cc8f

Browse files
authored
Merge pull request #15206 from rochala/documentation-snippet-typo
scaladoc: fix documentation snippet typos
2 parents 1390609 + 9e33699 commit ee9cc8f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

docs/_docs/contributing/debug-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You can run `help` for commands that supported by JDB.
3838

3939
Following file (`tests/debug/while.scala`) is an example of annotated source code:
4040

41-
```Scala
41+
```scala
4242
object Test {
4343

4444
def main(args: Array[String]): Unit = {

docs/_docs/reference/changed-features/pattern-matching.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Scala 3 supports a superset of Scala 2 [extractors](https://www.scala-lang.org/f
1212

1313
Extractors are objects that expose a method `unapply` or `unapplySeq`:
1414

15-
```Scala
15+
```scala
1616
def unapply[A](x: T)(implicit x: B): U
1717
def unapplySeq[A](x: T)(implicit x: B): U
1818
```
@@ -25,7 +25,7 @@ called variadic extractors, which enables variadic patterns.
2525

2626
Fixed-arity extractors expose the following signature:
2727

28-
```Scala
28+
```scala
2929
def unapply[A](x: T)(implicit x: B): U
3030
```
3131

@@ -36,7 +36,7 @@ The type `U` conforms to one of the following matches:
3636

3737
Or `U` conforms to the type `R`:
3838

39-
```Scala
39+
```scala
4040
type R = {
4141
def isEmpty: Boolean
4242
def get: S
@@ -62,7 +62,7 @@ A usage of a fixed-arity extractor is irrefutable if one of the following condit
6262

6363
Variadic extractors expose the following signature:
6464

65-
```Scala
65+
```scala
6666
def unapplySeq[A](x: T)(implicit x: B): U
6767
```
6868

@@ -73,7 +73,7 @@ The type `U` conforms to one of the following matches:
7373

7474
Or `U` conforms to the type `R`:
7575

76-
```Scala
76+
```scala
7777
type R = {
7878
def isEmpty: Boolean
7979
def get: S
@@ -167,7 +167,7 @@ object Nat:
167167
- `N > 1` is the maximum number of consecutive (parameterless `def` or `val`) `_1: P1 ... _N: PN` members in `U`
168168
- Pattern-matching on exactly `N` patterns with types `P1, P2, ..., PN`
169169

170-
```Scala
170+
```scala
171171
object ProdEmpty:
172172
def _1: Int = ???
173173
def _2: String = ???
@@ -184,7 +184,7 @@ object ProdEmpty:
184184

185185
- `U <: X`, `T2` and `T3` conform to `T1`
186186

187-
```Scala
187+
```scala
188188
type X = {
189189
def lengthCompare(len: Int): Int // or, `def length: Int`
190190
def apply(i: Int): T1
@@ -219,7 +219,7 @@ object CharList:
219219
- Pattern-matching on exactly `>= N` patterns, the first `N - 1` patterns have types `P1, P2, ... P(N-1)`,
220220
the type of the remaining patterns are determined as in Seq Pattern.
221221

222-
```Scala
222+
```scala
223223
class Foo(val name: String, val children: Int*)
224224
object Foo:
225225
def unapplySeq(f: Foo): Option[(String, Seq[Int])] =

docs/_docs/reference/experimental/explicit-nulls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ The program in [`unsafeNulls`](https://scala-lang.org/api/3.x/scala/runtime/stdL
480480
For example, the following code cannot be compiled even using unsafe nulls. Because of the
481481
Java interoperation, the type of the get method becomes `T | Null`.
482482

483-
```Scala
483+
```scala
484484
def head[T](xs: java.util.List[T]): T = xs.get(0) // error
485485
```
486486

0 commit comments

Comments
 (0)