private class Generic(val t: T) { private val x = object { val member = t } fun get() = x.member } fun stringIdentity(s: String) = Generic(s).get() fun intIdentity(i: Int) = Generic(i).get() class Outer { open interface C0 { fun fn0(): T0? = null } open interface C1 { fun fn1(): T1? = null } fun func1() { fun func2() { object: C0, C1 {} object: C0, C1 {} object: C0, C1 {} object: C0 {} object: C0 {} } } }