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