Skip to content

Commit 654909f

Browse files
committed
Address review comments
1 parent d78ba4a commit 654909f

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

compiler/src/dotty/tools/dotc/typer/Deriving.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ trait Deriving { this: Typer =>
161161
*
162162
* implicit def derived$D(implicit ev_1: D[T_1], ..., ev_n: D[T_n]): D[C[Ts]] = D.derived
163163
*
164-
* See the body of this method for who to generalize this to typeclasses with more
164+
* See the body of this method for how to generalize this to typeclasses with more
165165
* or less than one type parameter.
166166
*
167167
* See test run/typeclass-derivation2 and run/derive-multi

docs/docs/reference/contextual/derivation.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ The generated typeclass instances are placed in the companion objects `Labelled`
3838

3939
### Derivable Types
4040

41-
A trait or class can appear in a `derives` clause if
42-
43-
- it has a single type parameter, and
44-
- its companion object defines a method named `derived`.
45-
46-
These two conditions ensure that the synthesized derived instances for the trait are well-formed. The type and implementation of a `derived` method are arbitrary, but typically it has a definition like this:
41+
A trait or class can appear in a `derives` clause if its companion object defines a method named `derived`. The type and implementation of a `derived` method are arbitrary, but typically it has a definition like this:
4742
```scala
4843
def derived[T] with Generic[T] = ...
4944
```

0 commit comments

Comments
 (0)