summaryrefslogtreecommitdiff
path: root/test/files/neg/t7860.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/t7860.scala')
-rw-r--r--test/files/neg/t7860.scala42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/files/neg/t7860.scala b/test/files/neg/t7860.scala
new file mode 100644
index 0000000000..6cc0d3e7f5
--- /dev/null
+++ b/test/files/neg/t7860.scala
@@ -0,0 +1,42 @@
+
+class Test
+
+object Test {
+ private implicit class `for your eyes only`(i: Int) { // warn
+ def f = i
+ }
+}
+
+class Test2 {
+ import Test2._
+ println(5.toStr)
+}
+
+object Test2 {
+ // was: warning: private object in object Test2 is never used
+ // i.e. synthetic object C
+ private implicit class C(val i: Int) extends AnyVal { // no warn
+ def toStr = i.toString
+ }
+}
+
+class Test3 {
+ import Test3._
+ //println(5.toStr)
+}
+
+object Test3 {
+ // was: warning: private object in object Test2 is never used
+ // i.e. synthetic object C
+ private implicit class C(val i: Int) extends AnyVal { // warn
+ def toStr = i.toString
+ }
+}
+
+object Test4 {
+ class A { class B }
+
+ private val a: A = new A
+
+ def b = (new a.B).##
+}