To fix these problems, we've introduced the entries property for Enum classes, which should be used instead of the values() function. ![]() In addition, most of the APIs use collections, which require eventual conversion. However, using an array can lead to hidden performance issues in Kotlin and Java. We would appreciate your feedback on it in YouTrack.Įnum classes have a synthetic values() function, which returns an array of defined enum constants. It may be dropped or changed at any time. Lifting restrictions on secondary constructors with bodies in inline classes Report any problems you faced with the new K2 compiler on our issue tracker.Įnable the Send usage statistics option to allow JetBrains to collect anonymous data about K2 usage.Īs Kotlin continues to evolve, we're introducing preview versions for new language features in 1.8.20:Ī modern and performant replacement of the Enum class values functionĭata objects for symmetry with data classes Provide your feedback directly to K2 developers on Kotlin Slack – get an invite and join the #k2-early-adopters channel. ![]() We would appreciate any feedback you may have! ![]() Leave your feedback on the new K2 compiler It doesn't support Kotlin/Native or any of the multiplatform projects yet. The Alpha version of the new K2 compiler only works with JVM and JS IR projects. The previous -Xuse-k2 compiler option has been deprecated.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |