You define a value class with one constructor parameter and annotate it with
@JvmInline
. We expect everyone to use this new syntax starting from Kotlin 1.5. The old syntax
inline class
will continue to work for some time. It will be deprecated with a warning in 1.5 that will include an option to migrate all your declarations automatically. It will later be deprecated with an error.
m
Marko Novakovic
04/19/2021, 9:52 AM
@Albert Chang thanks
j
Jonathan Olsson
04/19/2021, 10:01 AM
A bit confusing that the blog post is started with an introduction to inline classes using the about to be deprecated syntax... 😅