import T.Companion.foo class T { companion object { fun T.foo() {} } } fun usage(t: T) { t.foo() } // INVOCATION_COUNT: 2 // ELEMENT: foo