interface Greeter { fun greet(): String } class Person(override val name: String): WithName, Greeter { override fun greet(): String = "Hello" } fun <T> introduceMyself(t: T): String where T: WithName, T: Greeter { return "${t.greet()}, I am ${t.name}!" } ジェネリック関数