Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
k163377 opened this issue Jan 24, 2023 · 1 comment
Labels
value class About value class support

Comments

@k163377
Copy link
Contributor

k163377 commented Jan 24, 2023

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

@k163377
Copy link
Contributor Author

k163377 commented Jan 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
value class About value class support
Projects
None yet
Development

No branches or pull requests

1 participant