package a class A { companion object { fun foo() { } } class B { } } fun foo() { A.B() }