aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/scala2traits
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-06-08 09:43:18 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-08 11:04:59 +0200
commit674e6bb0ed9ab7a45bf0016585c2c020eb50351b (patch)
tree4c71580e28ca15f5a9bb729241da1cf01264068c /tests/pos/scala2traits
parent6ca52b0f23f0c3425d054d0918a149e0e7afb765 (diff)
downloaddotty-674e6bb0ed9ab7a45bf0016585c2c020eb50351b.tar.gz
dotty-674e6bb0ed9ab7a45bf0016585c2c020eb50351b.tar.bz2
dotty-674e6bb0ed9ab7a45bf0016585c2c020eb50351b.zip
Fix to trait setter generation
The logic to add trait setters to Scala 2 traits was wrong. This led to AbstractMethodErrors in the formerly commented out part of scala-trait.scala.
Diffstat (limited to 'tests/pos/scala2traits')
-rw-r--r--tests/pos/scala2traits/scala-trait.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pos/scala2traits/scala-trait.scala b/tests/pos/scala2traits/scala-trait.scala
index db05bc941..4d91b12b2 100644
--- a/tests/pos/scala2traits/scala-trait.scala
+++ b/tests/pos/scala2traits/scala-trait.scala
@@ -9,7 +9,7 @@ trait T {
trait S2T {
var x: Int = 0
lazy val y: Int = 1
-// val z: Int = 2
+ val z: Int = 2
val a: Int
var b: Int
@@ -19,13 +19,13 @@ trait S2T {
trait S2Tprivate {
private var x: Int = 0
private lazy val y: Int = 1
-// private val z: Int = 2 // @darkdimius uncomment once lazy vals can be inherited.
+ private val z: Int = 2
private def f(x: Int): Int = x + y
def xx = x
def xx_=(x: Int) = this.x = x
def yy = y
-// def zz = z
+ def zz = z
def ff(x: Int) = f(x)
}