As I mentioned on the title how can i write a generic class and limit the type is concrete(bounded)? I know there is a reified keyword in Kotlin but it's only available with inline function..Is there any way to write like C# in Kotlin with instead of class of Any?
C# Code Example
public class Something<TType> where TType : class
{
TType Add(TType ttype){
return ttype;
}
}
Kotlin Code Example (trying to write equivalent code of C#)
open class Something<TType: class>
{
fun Add(ttype: TType): TType {
return ttype
}
}