From 28bf4ada31119712b415b2b2f6aeb87f0431eb48 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sat, 23 Nov 2013 22:25:22 +0100 Subject: 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 --- test/files/run/t8002.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/files/run/t8002.scala (limited to 'test/files/run') 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 +} -- cgit v1.2.3