diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-15 13:42:58 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-15 13:47:14 +0100 |
commit | 8642a50da8c0d0eb1e3001fb56426e8c1ef122f3 (patch) | |
tree | d1c294b85c82abef8cc181d9641afe6d08b07b4b /test/files/pos/t8132.scala | |
parent | e089cafb5fd02e2457bafde3252da3a771d3180e (diff) | |
download | scala-8642a50da8c0d0eb1e3001fb56426e8c1ef122f3.tar.gz scala-8642a50da8c0d0eb1e3001fb56426e8c1ef122f3.tar.bz2 scala-8642a50da8c0d0eb1e3001fb56426e8c1ef122f3.zip |
SI-8132 Fix false "overrides nothing" for case class protected param
Case class parameters that are less-than-public have an accessor
method created. In the enclosed test, we saw:
case class G extends AnyRef with T with Product with Serializable {
override <synthetic> <stable> <caseaccessor> def s$1: String = G.this.s;
<caseaccessor> <paramaccessor> private[this] val s: String = _;
override <stable> <accessor> <paramaccessor> protected def s: String = G.this.s;
...
}
This commit removes the OVERRIDE flag from the accessor method,
which avoids the spurious "overrides nothing" error.
Diffstat (limited to 'test/files/pos/t8132.scala')
-rw-r--r-- | test/files/pos/t8132.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/pos/t8132.scala b/test/files/pos/t8132.scala new file mode 100644 index 0000000000..b4d6fd9441 --- /dev/null +++ b/test/files/pos/t8132.scala @@ -0,0 +1,5 @@ +trait T { + protected def s: String +} + +case class G(override protected val s: String) extends T |