1 2 3 4 5 6 7 8 9 10
class A { object B { def apply(s: String) = 0} } object X { def foo: Unit = { val b = a.B("") val a = new A } }