Pending test for #466, which is not fixed by running after pickler instead of typer. Ref #609.

This commit is contained in:
Mark Harrah 2012-12-09 20:40:41 -05:00
parent ce9b43e9bd
commit 9a79af69c9
6 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,6 @@
trait A {
def x: Int
}
class E extends A {
def x = 19
}

View File

@ -0,0 +1,6 @@
trait B extends A {
abstract override def x = 1
}
trait C extends A {
abstract override def x = 3
}

View File

@ -0,0 +1,10 @@
class X extends E with C with B
object Main {
def main(args: Array[String]) {
val x = new X
val expected = args(0).toInt
assert(x.x == expected, "Expected " + expected + ", got " + x.x)
}
}

View File

@ -0,0 +1,6 @@
trait B extends A {
abstract override def x = super.x + 2
}
trait C extends A {
abstract override def x = 3
}

View File

@ -0,0 +1,6 @@
trait B extends A {
abstract override def x = super.x + 2
}
trait C extends A {
abstract override def x = super.x
}

View File

@ -0,0 +1,12 @@
# This test verifies that adding/removing calls to super in traits properly
# recompiles subclasses. super calls introduce accessors that are not in
# the public API, so this is not picked up by the usual API change detection.
> run 1
$ copy-file changes/B2.scala B.scala
> run 5
$ copy-file changes/B3.scala B.scala
> run 21