Skip to content

Commit 712fa3a

Browse files
committed
for -> of
1 parent 4cf5dc3 commit 712fa3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/reference/witnesses/witnesses.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Why prefer witnesses over implicit definitions? Their definitions are shorter, m
5656

5757
## Witnesses of Extension Methods
5858

59-
Witnesses can also be defined without a `for` clause. A typical application is to use a witness to define extension methods. Examples:
59+
Witnesses can also be defined without an `of` clause. A typical application is to use a witness to define extension methods. Examples:
6060

6161
```scala
6262
witness StringOps {
@@ -180,7 +180,7 @@ Here is the new syntax of witness definitions, seen as a delta from the [standar
180180
```
181181
TmplDef ::= ...
182182
| ‘witness’ WitnessDef
183-
WitnessDef ::= [id] WitnessParams [‘for’ ConstrApps] [TemplateBody]
183+
WitnessDef ::= [id] WitnessParams [‘of’ ConstrApps] [TemplateBody]
184184
WitnessParams ::= [DefTypeParamClause] {‘with’ ‘(’ [DefParams] ‘)}
185185
```
186-
The identifier `id` can be omitted only if either the `for` part or the template body is present. If the `for` part is missing, the template body must define at least one extension method.
186+
The identifier `id` can be omitted only if either the `of` part or the template body is present. If the `of` part is missing, the template body must define at least one extension method.

0 commit comments

Comments
 (0)