diff options
author | Adriaan Moors <adriaan@lightbend.com> | 2017-02-28 14:14:11 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan@lightbend.com> | 2017-04-06 08:00:13 -0700 |
commit | 31a56077af5c5b35049fec456204e12a19bb6701 (patch) | |
tree | b1e40f24fc34d87e117d2e7a0fdcccdeb4dc254c /spec | |
parent | 276434b4af2c2d244d1b5e596867041b36e7b920 (diff) | |
download | scala-31a56077af5c5b35049fec456204e12a19bb6701.tar.gz scala-31a56077af5c5b35049fec456204e12a19bb6701.tar.bz2 scala-31a56077af5c5b35049fec456204e12a19bb6701.zip |
Improvements based on reviews by Lukas & Jason
Diffstat (limited to 'spec')
-rw-r--r-- | spec/05-classes-and-objects.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/05-classes-and-objects.md b/spec/05-classes-and-objects.md index 246e579c94..ffb65979f7 100644 --- a/spec/05-classes-and-objects.md +++ b/spec/05-classes-and-objects.md @@ -876,10 +876,9 @@ If a type parameter section is missing in the class, it is also missing in the ` If the companion object $c$ is already defined, the `apply` and `unapply` methods are added to the existing object. +If the object $c$ already has a [matching](#definition-matching) +`apply` (or `unapply`) member, no new definition is added. The definition of `apply` is omitted if class $c$ is `abstract`. -If the object $c$ already defines a [matching](#definition-matching) member of the -same name as the synthetic member to be added, the synthetic member -is not added (overloading or mutual recursion is allowed, however). If the case class definition contains an empty value parameter list, the `unapply` method returns a `Boolean` instead of an `Option` type and |