diff --git a/spec-docs/reified-type-parameters.md b/spec-docs/reified-type-parameters.md index f986f629f4f..ab299767b2a 100644 --- a/spec-docs/reified-type-parameters.md +++ b/spec-docs/reified-type-parameters.md @@ -45,6 +45,7 @@ Notes: ## Implementation notes for the JVM In inline functions, occurrences of a `reified` type parameter `T` are replaced with the actual type argument. +If actual type argument is a primitive type, it's wrapper will be used within reified bytecode. ``` kotlin open class TypeLiteral { @@ -55,6 +56,7 @@ open class TypeLiteral { inline fun typeLiteral(): TypeLiteral = object : TypeLiteral() {} // here T is replaced with the actual type typeLiteral().type // returns 'class java.lang.String' +typeLiteral().type // returns 'class java.lang.Integer' typeLiteral>().type // returns '[Ljava.lang.String;' typeLiteral>().type // returns 'java.util.List' ```