Skip to content

If value in value class is nullable and the argument definition is non-null, deserialization fails by NoSuchMethodException when using default arguments. #51

Description

@k163377

The problem occurs when deserializing the following D with default arguments.

@JvmInline
value class NullableObject(val v: String?)

data class D(val v: NullableObject = NullableObject(""))

The cause is that the arguments of the default function generated in such cases are different from those of the normal default function.
What actually happens is described below.
https://youtrack.jetbrains.com/issue/KTIJ-24354

Metadata

Metadata

Assignees

No one assigned

    Labels

    value classAbout value class support

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions