How can you enable the new unused return value checker?
s
Stephan Schröder
07/14/2025, 9:15 AM
AFAIK you can't until maybe Kotlin 2.4. In Kotlin 2.3 it'll be used for Kotlin std-lib, but still not available for external use. Later, it'll be opened to be used by all.
s
sandwwraith
07/15/2025, 8:23 AM
Hi! It wasn't officially announced yet (planned for 2.3), however, most of the checker code is already in 2.2.20-Beta1. You can try it for your code with
-Xreturn-value-checker=full
. Note that external dependencies (incl. kotlin-stdlib) are not reported for now.