Stephan Schröder
03/06/2023, 11:14 AMJohann Pardanaud
03/06/2023, 12:03 PMtoString
for the password, thank you!CLOVIS
03/06/2023, 2:12 PMWhat if the original String value is neededAnother solution: developers can just locally replace the
toString
by one that actually prints the value during debugging, to log the actual values (don't forget to remove it before review!)
Like the annotationI thought this too, but that's not true!is hinting at, the only Kotlin backend that supports inline classes is the JVM.@JvmInline
@JvmInline
is a future-proofing solution by the Kotlin team until Valhalla comes out, because they want a simple un-annotated value class
to be inlined through Valhalla, and it's probably going to be binary-incompatible. They have already started implementing value classes on other platforms (at least, Kotlin/JS IR already inlines value classes in some cases, without needing an annotation).Stephan Schröder
03/06/2023, 2:40 PMCLOVIS
03/06/2023, 3:43 PMStephan Schröder
03/06/2023, 3:54 PMStephan Schröder
03/06/2023, 5:23 PMvalue class
works on KotlinJs! I'm going to update the post 👍CLOVIS
03/06/2023, 6:00 PMStephan Schröder
03/06/2023, 11:32 PM