blob: 6cc0d3e7f5a44da2fbe807163874e6d5f0195642 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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).##
}
|