summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t3118.check7
-rw-r--r--test/files/neg/t3118.scala8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/t3118.check b/test/files/neg/t3118.check
new file mode 100644
index 0000000000..da00f1c330
--- /dev/null
+++ b/test/files/neg/t3118.check
@@ -0,0 +1,7 @@
+t3118.scala:6: error: value C is not a member of O1
+ println(x.C()) // should not be accessible
+ ^
+t3118.scala:7: error: type C is not a member of O1
+ println(new x.C) // is correctly not accessible
+ ^
+two errors found
diff --git a/test/files/neg/t3118.scala b/test/files/neg/t3118.scala
new file mode 100644
index 0000000000..9be24c1ed4
--- /dev/null
+++ b/test/files/neg/t3118.scala
@@ -0,0 +1,8 @@
+class O1 {
+ private[this] case class C()
+
+ val x = new O1
+
+ println(x.C()) // should not be accessible
+ println(new x.C) // is correctly not accessible
+}