Skip to content

Commit 14c35c6

Browse files
committed
Doc fixes
Address comments by @soronpo
1 parent 0cff7c1 commit 14c35c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/docs/reference/contextual/context-parameters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ maximum(xs).with(descending.with(listOrd.with(intOrd)))
6969

7070
## Multiple With Clauses
7171

72-
There can be several with clauses in a definition. Example:
72+
There can be several `with` clauses in a definition. Example:
7373
```scala
7474
def f(u: Universe) with (ctx: u.Context) with (s: ctx.Symbol, k: ctx.Kind) = ...
7575
```
@@ -88,8 +88,8 @@ f(global).with(ctx).with(sym, kind)
8888
```
8989
But `f(global).with(sym, kind)` would give a type error.
9090

91-
With clauses can be freely interspersed with normal parameters, but a normal parameter clause cannot
92-
directly follow a with parameter clause consisting only of types outside parentheses. So the following is illegal:
91+
`with` clauses can be freely interspersed with normal parameters, but a normal parameter clause cannot
92+
directly follow a `with` clause consisting only of types outside parentheses. So the following is illegal:
9393
```scala
9494
def f with A, B (x: C) = ...
9595
```

docs/docs/reference/contextual/extension-methods.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ given listOps as AnyRef {
162162
def [T](xs: List[T]) third: T = xs.tail.tail.head
163163
}
164164
given extension_largest_List_T as AnyRef {
165-
def [T](xs: List[T]) largest (n: Int) with (Ordering[T]) =
166-
xs.sorted.takeRight(n)
165+
def [T](xs: List[T]) largest with (Ordering[T]) (n: Int) =
166+
xs.sorted.takeRight(n)
167167
}
168168
```
169169

0 commit comments

Comments
 (0)