Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaladoc: fix documentation snippet typos #15206

Merged
merged 2 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_docs/contributing/debug-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can run `help` for commands that supported by JDB.

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

```Scala
```scala
object Test {

def main(args: Array[String]): Unit = {
Expand Down
16 changes: 8 additions & 8 deletions docs/_docs/reference/changed-features/pattern-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Scala 3 supports a superset of Scala 2 [extractors](https://www.scala-lang.org/f

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

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

Fixed-arity extractors expose the following signature:

```Scala
```scala
def unapply[A](x: T)(implicit x: B): U
```

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

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

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

Variadic extractors expose the following signature:

```Scala
```scala
def unapplySeq[A](x: T)(implicit x: B): U
```

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

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

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

```Scala
```scala
object ProdEmpty:
def _1: Int = ???
def _2: String = ???
Expand All @@ -185,7 +185,7 @@ object ProdEmpty:

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

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

```Scala
```scala
class Foo(val name: String, val children: Int *)
object Foo:
def unapplySeq(f: Foo): Option[(String, Seq[Int])] =
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/reference/experimental/explicit-nulls.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ The program in [`unsafeNulls`](https://scala-lang.org/api/3.x/scala/runtime/stdL
For example, the following code cannot be compiled even using unsafe nulls. Because of the
Java interoperation, the type of the get method becomes `T | Null`.

```Scala
```scala
def head[T](xs: java.util.List[T]): T = xs.get(0) // error
```

Expand Down