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
}
}
Run Code Online (Sandbox Code Playgroud) kotlin ×1