class A { var result = "Fail" fun foo() { result = "OK" } } fun box(): String { val a = A() val x = A::foo x(a) return a.result }