Kotlin 2.3 introduced an experimental check for discarded call or expression results. It can catch a newly created string that is neither returned nor stored.
The demo alternates between an ignored result that triggers a warning and a result passed to a consumer. Compiler options control coverage; some return values are intentionally ignorable.
When to use
Try it on APIs or projects where accidentally ignored results are likely, then review its warnings.