summaryrefslogtreecommitdiff
path: root/test/files/run/t9946b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t9946b.scala')
-rw-r--r--test/files/run/t9946b.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t9946b.scala b/test/files/run/t9946b.scala
new file mode 100644
index 0000000000..ac102a38f7
--- /dev/null
+++ b/test/files/run/t9946b.scala
@@ -0,0 +1,12 @@
+class Test(private val x: String) {
+ lazy val y = x.reverse
+}
+object Test {
+ def getX(t: Test) = t.x
+ def main(args: Array[String]): Unit = {
+ val t = new Test("foo")
+ assert(t.y == "oof", t.y)
+ assert(t.x == "foo", t.x)
+ }
+}
+