summaryrefslogtreecommitdiff
path: root/test/files/pos/bug704.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/bug704.scala')
-rw-r--r--test/files/pos/bug704.scala27
1 files changed, 18 insertions, 9 deletions
diff --git a/test/files/pos/bug704.scala b/test/files/pos/bug704.scala
index aea8292f2d..a05e0a51e7 100644
--- a/test/files/pos/bug704.scala
+++ b/test/files/pos/bug704.scala
@@ -1,14 +1,23 @@
trait D {
- private val x = 1
+ private val x = "xxxx should appear twice"
private object xxxx { Console.println(x) }
+ def get_xxxx: AnyRef = xxxx
}
-object Go extends D {
- def main(args : Array[String]) : Unit = {};
-}
-trait D2 {
- val x = 1
- object yyyy { Console.println(x) }
+
+trait E extends D {
+ def f(): unit = {
+ val y = "yyyy should appear twice"
+ object yyyy {
+ val x1 = get_xxxx
+ Console.println(y)
+ }
+ yyyy
+ }
}
-object Go2 extends D2 {
- def main(args : Array[String]) : Unit = {};
+class C extends E {}
+object Go extends D {
+ def main(args : Array[String]) {
+ new C().f()
+ new C().f()
+ }
}