Suppose we have a Box type: data class Box(val thing: T) And a class that composes a thing of type T and a Jackson TypeReference for its boxed type: data class ThingAndBoxedTypeRef( val thing: T, val typeRef: TypeReference> ) { companion object { inline fun of(thing: T) = ThingAndBoxedTypeRef(thing, jacksonTypeRef()) } } To save you looking it up, jacksonTypeRef is just this: inline fun jacksonTypeRef(): TypeReference = object: TypeReference() {} Given that, constructing the composite type directly (with the explicit jacksonTypeRef() call) works great: println(ThingAndBoxedTypeRef("another string", jacksonTypeRef()).typeRef.type) // prints: com.foo.Box But using the `.of()` helper does not: println(ThingAndBoxedTypeRef.of("a string").typeRef.type) / prints: com.foo.Box Why is this?