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
constructor-impl
of Kotlin value class
is not called
#32324
Comments
I have reached Kotlin team to get related guidance. |
Coroutine handling (in |
Yeah I saw that but its slightly different from what I am saying which is
The only issue is this will need to use kotlin reflection |
Good point, should be ok to use this. |
In order to invoke the init block and to improve the maintainability. Closes spring-projectsgh-32324
The
init
block of thevalue class
can contain processing.This will be compiled into a method named
constructor-impl
in the bytecode.When instantiating a
value class
using Java reflection, bothconstructor-impl
andbox-impl
must be called in order to be equivalent to instantiating it onKotlin
.On the other hand, there is no evidence that
constructor-impl
is called in thespring-framework
, and onlybox-impl
seems to be called.Is this an intentional design?
The text was updated successfully, but these errors were encountered: