diff options
author | Martin Odersky <odersky@gmail.com> | 2006-09-12 10:18:33 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-09-12 10:18:33 +0000 |
commit | dc97215ec989aa4739c18aa74fa8f2ead78402f4 (patch) | |
tree | 3239a9bc794542f9a9770a95c884e1e8b65b68aa /test/files/pos | |
parent | 7165e8d40d3abede0e83acb1bd8419708b44ded6 (diff) | |
download | scala-dc97215ec989aa4739c18aa74fa8f2ead78402f4.tar.gz scala-dc97215ec989aa4739c18aa74fa8f2ead78402f4.tar.bz2 scala-dc97215ec989aa4739c18aa74fa8f2ead78402f4.zip |
fixes to ExplicitOuter to pass test suite
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug704.scala | 27 |
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() + } } |