2.1.20-Beta1
This version includes context parameters under the flag
-Xcontext-parameters
, but there is no IDE support (K2 Mode) in the current stable version of IntelliJ IDEA.
context(userContext: UserContext)
fun testUserInfo() {
println("Hello, world! I'm ${userContext.user.id}!")
}
Additionally, context receivers still function in 2.1.20-Beta1 (even though I previously wrote that they wouldn’t).
Also:
- Kotlin K2 compiler: new default kapt plugin
- Gradle: support for version 8.11
https://kotlinlang.org/docs/whatsnew-eap.html
https://github.com/JetBrains/kotlin/releases/tag/v2.1.20-Beta1