class A(val t: T) { fun foo(): T = t } fun box() = (A::foo).let { it(A("OK")) }