class A { companion object { fun foo() = 1 } } fun bar() = A.foo()