[Kotlin] preserves type information at runtime, including the [generic arguments of types and functions|Generics#Reified generics].

This information can be retrieved with the {{typeinfo()}} function:
{jet}
val typeinfo = typeinfo(list)
{jet}

{{typeinfo()}} returns an object of the class {{TypeInfo}} that provides type information and reflective access to the members of the given type.

To retrieve a {{TypeInfo}} instance of a type expression, we can use an overloaded version of the {{typeinfo()}} function, but passing in a type argument:
{jet}
val typeinfo = typeinfo<List<Int>>
{jet}

{note:title=TypeInfo is not supported yet}On the JVM you can say {{foo.javaClass}} to ge the Java class of {{foo}}.{note}

h3. What's next

* [Null-safety]
