diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t3569.check | 14 | ||||
-rw-r--r-- | test/files/run/t3569.flags | 1 | ||||
-rw-r--r-- | test/files/run/t3569.scala | 24 |
3 files changed, 39 insertions, 0 deletions
diff --git a/test/files/run/t3569.check b/test/files/run/t3569.check new file mode 100644 index 0000000000..aa19916324 --- /dev/null +++ b/test/files/run/t3569.check @@ -0,0 +1,14 @@ +1 +private final int Test$X.x2 +private final int Test$X.x3 +private final int Test$X.x5 +private final int Test$X.x6 +private final int Test$X.x7 +private int Test$X.x4 +private volatile int Test$X.bitmap$priv$0 +public int Test$X.x +public volatile int Test$X.bitmap$0 +private int Test$Y.z1 +public int Test$Y.x +public int Test$Y.y +public int Test$Y.z2 diff --git a/test/files/run/t3569.flags b/test/files/run/t3569.flags new file mode 100644 index 0000000000..6933d924d3 --- /dev/null +++ b/test/files/run/t3569.flags @@ -0,0 +1 @@ +-Yinline
\ No newline at end of file diff --git a/test/files/run/t3569.scala b/test/files/run/t3569.scala new file mode 100644 index 0000000000..e553f16ff8 --- /dev/null +++ b/test/files/run/t3569.scala @@ -0,0 +1,24 @@ +object Test { + lazy val lv = scala.util.Random.nextInt() + + class X(final var x: Int) { + final private[this] var x2: Int = 0 + final var x3: Int = 0 + private[this] var x4: Int = 0 + final private[this] var x5: Int = 0 + final lazy val x6: Int = 0 + final private[this] lazy val x7: Int = 0 + } + case class Y(final var x: Int, final private var y: Int, var z1: Int, private var z2: Int) { } + + def f = new X(0).x += 1 + def main(args: Array[String]) { + f + val s = new X(0) + s.x += 1 + println(s.x) + + (classOf[X].getDeclaredFields map ("" + _)).sorted foreach println + (classOf[Y].getDeclaredFields map ("" + _)).sorted foreach println + } +} |