yole
02/05/2016, 6:26 PMclass GenericClass<T> where T : Interface {
fun doSomethingWithT(t: T) { t.interfaceMethod() }
companion object {
private val instance: GenericClass<Interface> = GenericClass()
fun <T> getAnInstance(): GenericClass<T> where T : Interface {
return instance as GenericClass<T>
}
}
}