diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-07-07 16:55:36 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan@lightbend.com> | 2016-08-11 10:59:16 -0700 |
commit | 16e7cf335bf9fbd7f68b043b9d670336c6897809 (patch) | |
tree | 1d42d7376192ab8539e4a38e7afe7895793b95bd /test/files | |
parent | b79c0d124e839e9e7ae5db883488c0134642472b (diff) | |
download | scala-16e7cf335bf9fbd7f68b043b9d670336c6897809.tar.gz scala-16e7cf335bf9fbd7f68b043b9d670336c6897809.tar.bz2 scala-16e7cf335bf9fbd7f68b043b9d670336c6897809.zip |
Align double definition check with spec
Remove weird special cases for private-local fields
and parameter accessor (fields).
One change with the new trait val encoding:
```
scala> trait T { private[this] var x: String = "1" ; def x(): Int = 1 }
<console>:11: error: method x is defined twice;
the conflicting variable x was defined at line 11:37
trait T { private[this] var x: String = "1" ; def x(): Int = 1 }
^
```
Whereas:
```
scala> class T { private[this] var x: String = "1" ; def x(): Int = 1 }
defined class T
```
Before, both the `class` and `trait` definition were accepted.
(Because there is no accessor for a private[this] val/var,
and a MethodType does not match the type of a value.)
(Dotty accepts neither the class or the trait definition.)
Diffstat (limited to 'test/files')
0 files changed, 0 insertions, 0 deletions