reified type parameter

In the body of a generic function like myGenericFun,  you can't access the type T because it's only available at compile time but erased at runtime. Therefore, if you want to use the generic type as a normal class in the function body you need to explicitly pass the class as a parameter as shown in myGenericFun.
```
fun <T> myGenericFun(c: Class<T>) 
```
If you create an inline function with a reified T, the type of T can be accessed even at runtime, and thus you do not need to pass the Class<T> additionally. You can work with T as if it was a normal class - e.g. you might want to check whether a variable is an instance of T, which you can easily do then: myVar is T.
Such an inline function with reified type T looks as follows:
```
inline fun <reified T> myGenericFun()
```
You can only use reified in combination with an inline function. By doing so, you instruct the compiler to copy the function's bytecode to every spot the function is invoked from (the compiler "inlines" the function). When you call an inline function with reified type, the compiler has to be able to know the actual type passed as a type argument so that it can modify the generated bytecode to use the corresponding class directly. Therefore a call like myVar is T becomes myVar is String in the bytecode (if the type argument is String).


Reified type parameters allow you to refer at runtime to the specific types used as type arguments in an inline function call. For normal classes or functions, this isn’t possible, because type arguments are erased at runtime.