Closed
Description
As for now, there is check for generic type if it's generic value class field, and that's working normally
nestedType.getClassifier() instanceof KTypeParameter ktp
but it fails with class cast exception when this constructor is being invoked with the KType parameter
private ValueBoxing(BoxingRules rules, KParameter parameter) {
this(rules, parameter.getType(), (KClass<?>) parameter.getType().getClassifier(), parameter.isOptional());
}
Example data class :
data class Foo<T>{val bar: T? = null)