From 674e6bb0ed9ab7a45bf0016585c2c020eb50351b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 8 Jun 2015 09:43:18 +0200 Subject: 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. --- tests/pos/scala2traits/scala-trait.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/pos/scala2traits') 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) } -- cgit v1.2.3