# Latest

**URL:** https://discuss.kotlinlang.org/latest.md?page=4

[Latest](https://discuss.kotlinlang.org/latest.md) · [Categories](https://discuss.kotlinlang.org/categories.md)

**Page:** 5

---

## [Allow to declare directly \`val\` in the \`if\` statement and use in body](https://discuss.kotlinlang.org/t/allow-to-declare-directly-val-in-the-if-statement-and-use-in-body/1996)

<div class="topic-metadata">

**Author:** [@elect](https://discuss.kotlinlang.org/u/elect)\
**Replies:** 8\
**Last updated:** [October 20, 2025, 8:38pm UTC](https://discuss.kotlinlang.org/t/allow-to-declare-directly-val-in-the-if-statement-and-use-in-body/1996 "2025-10-20T20:38:03Z")

</div>

First of all, Kotlin is awesome! Second, it’d be cool if we could have something similar to smart cast, that is declaring a val (thread safe) inside the if statement and use it directly in the body if( val email = clie…

---

## [Unbelievable error message after compile](https://discuss.kotlinlang.org/t/unbelievable-error-message-after-compile/30778)

<div class="topic-metadata">

**Author:** [@ppinedo](https://discuss.kotlinlang.org/u/ppinedo)\
**Replies:** 7\
**Last updated:** [October 20, 2025, 11:52am UTC](https://discuss.kotlinlang.org/t/unbelievable-error-message-after-compile/30778 "2025-10-20T11:52:18Z")

</div>

Hello everybody¡¡ I’m starting to learn different aspects about programming in kotlin. Sometimes I recive this confussin error message, I don’t understand it. can anybody explain me it?? but if I open the generated…

---

## [C++ Library for Desktop Build](https://discuss.kotlinlang.org/t/c-library-for-desktop-build/30791)

<div class="topic-metadata">

**Author:** [@bessermt](https://discuss.kotlinlang.org/u/bessermt)\
**Replies:** 1\
**Last updated:** [October 20, 2025, 5:29am UTC](https://discuss.kotlinlang.org/t/c-library-for-desktop-build/30791 "2025-10-20T05:29:53Z")

</div>

I just started to learn KMP and I want to see how to integrate C++ code into my project. I successfully edited the build.gradle.kts to build a C++ library for Android and have called a JNI function in the library. // co…

---

## [Delete / clear account](https://discuss.kotlinlang.org/t/delete-clear-account/30795)

<div class="topic-metadata">

**Author:** [@ocky7](https://discuss.kotlinlang.org/u/ocky7)\
**Replies:** 3\
**Last updated:** [October 19, 2025, 12:07am UTC](https://discuss.kotlinlang.org/t/delete-clear-account/30795 "2025-10-19T00:07:15Z")

</div>

I like to periodically scrub my online presence. I don’t mind the content going on to exist, but I would like the username to be replaced by \[deleted account\] or something similar. The profile page doesn’t allow me to ed…

---

## [Requested invite to Slack twice, no response](https://discuss.kotlinlang.org/t/requested-invite-to-slack-twice-no-response/16972)

<div class="topic-metadata">

**Author:** [@NativeNilgai](https://discuss.kotlinlang.org/u/NativeNilgai)\
**Replies:** 4\
**Last updated:** [October 18, 2025, 3:45pm UTC](https://discuss.kotlinlang.org/t/requested-invite-to-slack-twice-no-response/16972 "2025-10-18T15:45:32Z")

</div>

Hi all This is essentially the same issue as Slack request, no response but I presume it is preferred that I post a new thread. The Kotlin Community page ( Community ) suggests it is possible to join the slack channel …

---

## [How to cancel forum membership](https://discuss.kotlinlang.org/t/how-to-cancel-forum-membership/23124)

<div class="topic-metadata">

**Author:** [@absoluterookie](https://discuss.kotlinlang.org/u/absoluterookie)\
**Replies:** 2\
**Last updated:** [October 16, 2025, 10:29pm UTC](https://discuss.kotlinlang.org/t/how-to-cancel-forum-membership/23124 "2025-10-16T22:29:58Z")

</div>

Maybe you can help me. Maybe im just stupid. I find everything in my profile but no button to leave the forum for good (delete my account and so on)

---

## [A syntax-level support for reactive ref type](https://discuss.kotlinlang.org/t/a-syntax-level-support-for-reactive-ref-type/30788)

<div class="topic-metadata">

**Author:** [@zhengkeli](https://discuss.kotlinlang.org/u/zhengkeli)\
**Replies:** 3\
**Last updated:** [October 15, 2025, 9:40pm UTC](https://discuss.kotlinlang.org/t/a-syntax-level-support-for-reactive-ref-type/30788 "2025-10-15T21:40:58Z")

</div>

A reactive pipeline is very commonly used in various sicarios. In frontend development, we use such pipelines to bind the states and views in many ways. For example, we have ref and computed in Vue. We have re-executing …

---

## [Coroutines and deadlocks](https://discuss.kotlinlang.org/t/coroutines-and-deadlocks/18060)

<div class="topic-metadata">

**Author:** [@Loke](https://discuss.kotlinlang.org/u/Loke)\
**Replies:** 23\
**Last updated:** [October 15, 2025, 4:35am UTC](https://discuss.kotlinlang.org/t/coroutines-and-deadlocks/18060 "2025-10-15T04:35:34Z")

</div>

I have been experimenting with using coroutines to add some parallelisation features to my project. I came across a deadlock, and I have created a small testcase that illustrates the problem. When running the following …

---

## [I need guidence regarding navigation in KMP](https://discuss.kotlinlang.org/t/i-need-guidence-regarding-navigation-in-kmp/30790)

<div class="topic-metadata">

**Author:** [@MIhraiz](https://discuss.kotlinlang.org/u/MIhraiz)\
**Replies:** 1\
**Last updated:** [October 15, 2025, 2:47am UTC](https://discuss.kotlinlang.org/t/i-need-guidence-regarding-navigation-in-kmp/30790 "2025-10-15T02:47:28Z")

</div>

We have a native Android app that is mostly WebViews and uses Jetpack Navigation. We want to start migrating to fully native screens using Kotlin Multiplatform (KMP) to share both logic and UI between Android and iOS. No…

---

## [Is it possible to configure demand delivery in KMP project](https://discuss.kotlinlang.org/t/is-it-possible-to-configure-demand-delivery-in-kmp-project/30789)

<div class="topic-metadata">

**Author:** [@harshul.v](https://discuss.kotlinlang.org/u/harshul.v)\
**Replies:** 0\
**Last updated:** [October 13, 2025, 7:45am UTC](https://discuss.kotlinlang.org/t/is-it-possible-to-configure-demand-delivery-in-kmp-project/30789 "2025-10-13T07:45:57Z")

</div>

I’m working on a Kotlin Multiplatform (KMP) project and want to explore whether it’s possible to configure on-demand feature delivery, similar to Android’s Play Feature Delivery or Play Asset Delivery. The idea is that …

---

## [Kotlin's dependency on Jetbrains Annotations 13.0](https://discuss.kotlinlang.org/t/kotlins-dependency-on-jetbrains-annotations-13-0/28206)

<div class="topic-metadata">

**Author:** [@hugoncosta](https://discuss.kotlinlang.org/u/hugoncosta)\
**Replies:** 1\
**Last updated:** [October 9, 2025, 12:07pm UTC](https://discuss.kotlinlang.org/t/kotlins-dependency-on-jetbrains-annotations-13-0/28206 "2025-10-09T12:07:21Z")

</div>

Hello everyone, I’ve recently bumped my version of kotlinx-coroutines-core-jvm from 1.6.4 to 1.8.0 and started to have conflicts between kotlin-stdlib’s annotations (which are set to 13.0 even up to the latest 2.0 beta)…

---

## [How to generate Kotlin classes from typescript interfaces](https://discuss.kotlinlang.org/t/how-to-generate-kotlin-classes-from-typescript-interfaces/23376)

<div class="topic-metadata">

**Author:** [@susmitha.gudapati](https://discuss.kotlinlang.org/u/susmitha.gudapati)\
**Replies:** 1\
**Last updated:** [October 7, 2025, 5:58pm UTC](https://discuss.kotlinlang.org/t/how-to-generate-kotlin-classes-from-typescript-interfaces/23376 "2025-10-07T17:58:39Z")

</div>

I have typescript applications and want to use Kotlin in some of the applications now. I want to generate Kotlin classes from typescript definitions. I’ve tried using Dukat but it’s still in progress and there are concer…

---

## [Access protected member of another instance of a superclass](https://discuss.kotlinlang.org/t/access-protected-member-of-another-instance-of-a-superclass/30772)

<div class="topic-metadata">

**Author:** [@Gouvernathor](https://discuss.kotlinlang.org/u/Gouvernathor)\
**Replies:** 7\
**Last updated:** [October 5, 2025, 2:37pm UTC](https://discuss.kotlinlang.org/t/access-protected-member-of-another-instance-of-a-superclass/30772 "2025-10-05T14:37:48Z")

</div>

I have the class O that defines the protected field code. I have the class BO that extends O. In a method of BO that takes a BO as a parameter, I can access this.code and other.code. But in a method of BO that takes an…

---

## [Mismatch between glibc versions (Kotlin/Native on Linux)](https://discuss.kotlinlang.org/t/mismatch-between-glibc-versions-kotlin-native-on-linux/30780)

<div class="topic-metadata">

**Author:** [@marandil](https://discuss.kotlinlang.org/u/marandil)\
**Replies:** 0\
**Last updated:** [October 2, 2025, 4:02pm UTC](https://discuss.kotlinlang.org/t/mismatch-between-glibc-versions-kotlin-native-on-linux/30780 "2025-10-02T16:02:30Z")

</div>

Consider the following example: Project foo is a KMP library with cinterop dependencies. The dependencies are built with system toolchain and target system libraries, e.g. glibc \> 2.20 Project bar is a KMP / KN executa…

---

## [Accessibility iOS traversal order inconsistent?](https://discuss.kotlinlang.org/t/accessibility-ios-traversal-order-inconsistent/30779)

<div class="topic-metadata">

**Author:** [@sousaepedro](https://discuss.kotlinlang.org/u/sousaepedro)\
**Replies:** 0\
**Last updated:** [October 2, 2025, 3:12am UTC](https://discuss.kotlinlang.org/t/accessibility-ios-traversal-order-inconsistent/30779 "2025-10-02T03:12:48Z")

</div>

I’m not sure if I’m opening this in the right place but I’ve been banging my head against the wall for over a month on this I’ve got a compose scrollable column with some items, and I can’t make accessibility navigation…

---

## [Value class box-impl override](https://discuss.kotlinlang.org/t/value-class-box-impl-override/30774)

<div class="topic-metadata">

**Author:** [@ybznek](https://discuss.kotlinlang.org/u/ybznek)\
**Replies:** 1\
**Last updated:** [September 30, 2025, 5:44pm UTC](https://discuss.kotlinlang.org/t/value-class-box-impl-override/30774 "2025-09-30T17:44:56Z")

</div>

When int is converted into Integer (autoboxing), compiler calls public static Integer valueOf(int i); When underlying field is converted into an instance of the value class, the compiler calls ValueClass.box-impl method…

---

## [Difference between function type with receiver and extension function](https://discuss.kotlinlang.org/t/difference-between-function-type-with-receiver-and-extension-function/30775)

<div class="topic-metadata">

**Author:** [@birojow](https://discuss.kotlinlang.org/u/birojow)\
**Replies:** 3\
**Last updated:** [September 30, 2025, 10:12am UTC](https://discuss.kotlinlang.org/t/difference-between-function-type-with-receiver-and-extension-function/30775 "2025-09-30T10:12:42Z")

</div>

Consider the following functions: fun Int.ext() { // TODO } fun doSomething(f: Int.() -\> Unit) { // TODO } The functional parameter f has the same type as the extension function ext. So, I can do this: doSome…

---

## [Cannot access 'java.io.Serializable' which is a supertype of](https://discuss.kotlinlang.org/t/cannot-access-java-io-serializable-which-is-a-supertype-of/16595)

<div class="topic-metadata">

**Author:** [@uuf6429](https://discuss.kotlinlang.org/u/uuf6429)\
**Replies:** 12\
**Last updated:** [September 28, 2025, 11:33am UTC](https://discuss.kotlinlang.org/t/cannot-access-java-io-serializable-which-is-a-supertype-of/16595 "2025-09-28T11:33:09Z")

</div>

I’ve been using Kotlin at work for several months now and today I tried creating a new personal project on my machine at home. I did what I wanted to do in around an hour and spent the rest of the evening pulling my hai…

---

## [Is the new WebElementView meant for replacing usage of native web views?](https://discuss.kotlinlang.org/t/is-the-new-webelementview-meant-for-replacing-usage-of-native-web-views/30764)

<div class="topic-metadata">

**Author:** [@jvskriubakken](https://discuss.kotlinlang.org/u/jvskriubakken)\
**Replies:** 1\
**Last updated:** [September 26, 2025, 7:06am UTC](https://discuss.kotlinlang.org/t/is-the-new-webelementview-meant-for-replacing-usage-of-native-web-views/30764 "2025-09-26T07:06:15Z")

</div>

I see that Compose Multiplatform 1.9 has just released with the introduction of the new WebElementView New API for embedding HTML content I’m making a Compose Multiplatform (targeted to iOS and Android) that’s just a w…

---

## [Why is method with vararg param selected when passing named arguments?](https://discuss.kotlinlang.org/t/why-is-method-with-vararg-param-selected-when-passing-named-arguments/30767)

<div class="topic-metadata">

**Author:** [@sanitizedUser](https://discuss.kotlinlang.org/u/sanitizedUser)\
**Replies:** 5\
**Last updated:** [September 24, 2025, 8:16am UTC](https://discuss.kotlinlang.org/t/why-is-method-with-vararg-param-selected-when-passing-named-arguments/30767 "2025-09-24T08:16:14Z")

</div>

Consider this code: class Log { private fun print(input: String, params: String) { println("${input.padEnd(15)}-\> $params") } fun debug(input: String, vararg data: Any) { print(input, "vara…

---

## [Can't call String.split with Char?](https://discuss.kotlinlang.org/t/cant-call-string-split-with-char/19297)

<div class="topic-metadata">

**Author:** [@rnikander](https://discuss.kotlinlang.org/u/rnikander)\
**Replies:** 4\
**Last updated:** [September 17, 2025, 7:41pm UTC](https://discuss.kotlinlang.org/t/cant-call-string-split-with-char/19297 "2025-09-17T19:41:07Z")

</div>

It’s late in the day and I’m probably doing something stupid… val s: String = ... s.split(':', true, 1) // error This fails with the error below. Why can’t I call the second one? None of the following functions can …

---

## [Time out for reading from a stream](https://discuss.kotlinlang.org/t/time-out-for-reading-from-a-stream/30740)

<div class="topic-metadata">

**Author:** [@moddy\_te\_eni](https://discuss.kotlinlang.org/u/moddy_te_eni)\
**Replies:** 4\
**Last updated:** [September 16, 2025, 2:24pm UTC](https://discuss.kotlinlang.org/t/time-out-for-reading-from-a-stream/30740 "2025-09-16T14:24:19Z")

</div>

I use InputStream.read() to read from a pipe after creating a sub-process. I had a problem that the process got stuck, so I wrote a quite complicated code with coroutines, sleep, available() and other tests to make sure…

---

## [Updated Kotlin Courses for 2025](https://discuss.kotlinlang.org/t/updated-kotlin-courses-for-2025/30271)

<div class="topic-metadata">

**Author:** [@madrinenamulindwa90](https://discuss.kotlinlang.org/u/madrinenamulindwa90)\
**Replies:** 1\
**Last updated:** [September 16, 2025, 8:23am UTC](https://discuss.kotlinlang.org/t/updated-kotlin-courses-for-2025/30271 "2025-09-16T08:23:27Z")

</div>

Good day here , I am learning Kotlin for Android development but I am facing a challenge as all the course I have come across are a bit outdate. Any recommendations for updated courses??

---

## [Why does my Kotlin Android app crash when using coroutines in ViewModel?](https://discuss.kotlinlang.org/t/why-does-my-kotlin-android-app-crash-when-using-coroutines-in-viewmodel/30709)

<div class="topic-metadata">

**Author:** [@stevediaz](https://discuss.kotlinlang.org/u/stevediaz)\
**Replies:** 2\
**Last updated:** [September 16, 2025, 8:19am UTC](https://discuss.kotlinlang.org/t/why-does-my-kotlin-android-app-crash-when-using-coroutines-in-viewmodel/30709 "2025-09-16T08:19:33Z")

</div>

Hello I am developing an Android app in Kotlin and recently added coroutines to handle background tasks in my ViewModel. :slightly\_smiling\_face: The issue is that when the screen rotates or the activity is recreated; th…

---

## [Throws annotations for Objective-C interop](https://discuss.kotlinlang.org/t/throws-annotations-for-objective-c-interop/30759)

<div class="topic-metadata">

**Author:** [@swi](https://discuss.kotlinlang.org/u/swi)\
**Replies:** 0\
**Last updated:** [September 15, 2025, 2:58pm UTC](https://discuss.kotlinlang.org/t/throws-annotations-for-objective-c-interop/30759 "2025-09-15T14:58:25Z")

</div>

Hi, I have a quick question about exception handling when calling a Kotlin function from Swift/Objective-C code. Do I need to annotate all functions, including nested and helper functions, or is it enough to annotate o…

---

## [Black screen issue for the iOS platform during screen switch](https://discuss.kotlinlang.org/t/black-screen-issue-for-the-ios-platform-during-screen-switch/30758)

<div class="topic-metadata">

**Author:** [@Ice](https://discuss.kotlinlang.org/u/Ice)\
**Replies:** 0\
**Last updated:** [September 15, 2025, 1:15pm UTC](https://discuss.kotlinlang.org/t/black-screen-issue-for-the-ios-platform-during-screen-switch/30758 "2025-09-15T13:15:08Z")

</div>

Hi, KMP community, during the development of the KMP + Compose UI application, I encountered an iOS-only UI issue. The problem looks like, when using the application in some random moment of the time, screens stay black…

---

## [BottomModalLayout OnDismiss is closing on clicking outside the scrim](https://discuss.kotlinlang.org/t/bottommodallayout-ondismiss-is-closing-on-clicking-outside-the-scrim/30757)

<div class="topic-metadata">

**Author:** [@truebillionhari](https://discuss.kotlinlang.org/u/truebillionhari)\
**Replies:** 1\
**Last updated:** [September 13, 2025, 1:31pm UTC](https://discuss.kotlinlang.org/t/bottommodallayout-ondismiss-is-closing-on-clicking-outside-the-scrim/30757 "2025-09-13T13:31:10Z")

</div>

val scope = rememberCoroutineScope() val sheetState = rememberModalBottomSheetState( skipPartiallyExpanded = true, confirmValueChange = { it == SheetValue.Expanded } ) …

---

## [Error when compiling with K2JVMCompiler dynamically in Java](https://discuss.kotlinlang.org/t/error-when-compiling-with-k2jvmcompiler-dynamically-in-java/30744)

<div class="topic-metadata">

**Author:** [@John\_Fairhall](https://discuss.kotlinlang.org/u/John_Fairhall)\
**Replies:** 9\
**Last updated:** [September 10, 2025, 12:08am UTC](https://discuss.kotlinlang.org/t/error-when-compiling-with-k2jvmcompiler-dynamically-in-java/30744 "2025-09-10T00:08:25Z")

</div>

Hi, I am new to Kotlin. We are planning on using kotlin to run pluggable scripts, so I am trying to compile kotlin scripts in java and add to the available classes. My java code puts the script text to a file and runs …

---

## [Intellij plugin for Kotlin script definitions](https://discuss.kotlinlang.org/t/intellij-plugin-for-kotlin-script-definitions/30747)

<div class="topic-metadata">

**Author:** [@fish](https://discuss.kotlinlang.org/u/fish)\
**Replies:** 2\
**Last updated:** [September 8, 2025, 8:43pm UTC](https://discuss.kotlinlang.org/t/intellij-plugin-for-kotlin-script-definitions/30747 "2025-09-08T20:43:00Z")

</div>

I’m trying to make a plugin to add a custom script definition to IDEA. I’ve managed to make a script definition show up without any plugins if I have the project that contains the script definition loaded, but I’d like a…

---

## [Lsp + mcp](https://discuss.kotlinlang.org/t/lsp-mcp/30749)

<div class="topic-metadata">

**Author:** [@esafak](https://discuss.kotlinlang.org/u/esafak)\
**Replies:** 0\
**Last updated:** [September 4, 2025, 5:51pm UTC](https://discuss.kotlinlang.org/t/lsp-mcp/30749 "2025-09-04T17:51:10Z")

</div>

Has anyone used the Kotlin LSP with MCP?

[Previous page](https://discuss.kotlinlang.org/latest.md?page=3)

[Next page](https://discuss.kotlinlang.org/latest.md?page=5)
