summaryrefslogtreecommitdiff
path: root/test/files/run/t8002.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-11-23 22:25:22 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-11-24 09:12:24 +0100
commit28bf4ada31119712b415b2b2f6aeb87f0431eb48 (patch)
treeb4aad81d541a4fa1327b051c67f277554aa6aecc /test/files/run/t8002.scala
parentc243435f113615b2f7407fbd683c93ec16c73749 (diff)
downloadscala-28bf4ada31119712b415b2b2f6aeb87f0431eb48.tar.gz
scala-28bf4ada31119712b415b2b2f6aeb87f0431eb48.tar.bz2
scala-28bf4ada31119712b415b2b2f6aeb87f0431eb48.zip
SI-8002 private access for local companions
We go through similar gymnastics to make companion implicits work for local class/object pairings, so we ought to be consistent when it comes to access
Diffstat (limited to 'test/files/run/t8002.scala')
-rw-r--r--test/files/run/t8002.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t8002.scala b/test/files/run/t8002.scala
new file mode 100644
index 0000000000..f24a213dea
--- /dev/null
+++ b/test/files/run/t8002.scala
@@ -0,0 +1,19 @@
+object Test extends App {
+ val a: Any = {
+ class A private () { private def x = 0; A.y };
+ object A {
+ def a = new A().x
+ private def y = 0
+ }
+ A.a
+ }
+ def b: Any = {
+ object A {
+ def a = new A().x
+ private def y = 0
+ }
+ class A private () { private def x = 0; A.y };
+ A.a
+ }
+ b
+}