summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-12-12 12:27:43 -0800
committerPaul Phillips <paulp@improving.org>2012-12-12 12:27:43 -0800
commitcad4c1a7a70536f285623be2434f72ee5bbf601d (patch)
tree0cf010694d360d5ec8e82fdfb2599acc8de80f58 /test
parent00eb7af51d446b3e6aa963ad14b2a4d93dd4c69c (diff)
parente77db05f7306aeb80c46df9c8d76dfd739a97e6a (diff)
downloadscala-cad4c1a7a70536f285623be2434f72ee5bbf601d.tar.gz
scala-cad4c1a7a70536f285623be2434f72ee5bbf601d.tar.bz2
scala-cad4c1a7a70536f285623be2434f72ee5bbf601d.zip
Merge pull request #1743 from paulp/pr/shared-trees
reduce sharing between trees
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t0091.check1
-rw-r--r--test/files/run/t0091.scala15
2 files changed, 10 insertions, 6 deletions
diff --git a/test/files/run/t0091.check b/test/files/run/t0091.check
index 7ed6ff82de..fd3c81a4d7 100644
--- a/test/files/run/t0091.check
+++ b/test/files/run/t0091.check
@@ -1 +1,2 @@
5
+5
diff --git a/test/files/run/t0091.scala b/test/files/run/t0091.scala
index eaddde0dbf..45235eb77b 100644
--- a/test/files/run/t0091.scala
+++ b/test/files/run/t0091.scala
@@ -4,10 +4,13 @@ object C extends B {
object m extends A { def x = 5 }
}
object Test {
- // The type annotation here is necessary, otherwise
- // the compiler would reference C$m$ directly.
- def o : B = C
- def main(argv : Array[String]) : Unit = {
- println(o.m.x)
- }
+ // The type annotation here is necessary, otherwise
+ // the compiler would reference C$m$ directly.
+ def o1 : B = C
+ def o2 = C
+
+ def main(argv : Array[String]) : Unit = {
+ println(o1.m.x)
+ println(o2.m.x)
+ }
}