在Kotlin中,是否有一种方法可以创建一个通用属性,而不需要声明类级别的通用类型?类似于这样的东西:
interface Generic {
val t: T //I need this type only once, thats why I dont wanna pass in the class level
fun <E> gMethod(e: E) { //This works, so I'm wondering if there's something similiar to properties
}
}