summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-05-22 09:27:07 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-05-22 09:27:07 +1000
commit99fcdf758e5b52f77a138bc777692dd2461e0a9c (patch)
treea905597c101bfab1a25623f21f9b24f3727aef57 /test
parent0c360f6d285fdea1fb240248b6c857cc942fbede (diff)
downloadscala-99fcdf758e5b52f77a138bc777692dd2461e0a9c.tar.gz
scala-99fcdf758e5b52f77a138bc777692dd2461e0a9c.tar.bz2
scala-99fcdf758e5b52f77a138bc777692dd2461e0a9c.zip
SI-9321 Clarify spec for inheritance of qualified private
I checked the intent with Martin, who said: > [...] qualified private members are inherited like other members, > it’s just that their access is restricted. I've locked this in with a test as well.
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t9321.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/t9321.scala b/test/files/pos/t9321.scala
new file mode 100644
index 0000000000..ed3a816656
--- /dev/null
+++ b/test/files/pos/t9321.scala
@@ -0,0 +1,10 @@
+object p {
+ trait A {
+ private[p] val qualifiedPrivateMember = 1
+ }
+
+ def useQualifiedPrivate(b: Mix) =
+ b.qualifiedPrivateMember // allowed
+}
+
+trait Mix extends p.A