The Wire · Showcase
KOTLIN COMPILER FIXES ELVIS OPERATOR FALSE POSITIVES, TIGHTENS WASM CACHING
By RepoJournal · Filed · About Mobile platforms
Kotlin's control flow graph just got smarter about dead code detection, eliminating false warnings that have been shadowing real issues.
The FIR compiler team landed a critical fix for elvis operator handling [1], where expressions resolving to Nothing on both sides were incorrectly marked as unreachable code. This fix matters because it clears noise from your compiler output so you can actually see real problems. In the same window, cross-enum-entry initialization checks moved into CFG analysis [2], improving how the compiler validates enum transitions. On the Wasm front, the team flipped IC cache invalidation from a blacklist to a whitelist model [3], a defensive architecture shift that prevents future silent cache misses. The IR layer gained explicit module fragment linking [4] to track external package dependencies, and the KaType API is deprecating isClassType in favor of a cleaner classId interface [5]. Together, these five changes tighten the compiler's reasoning about control flow, initialization, and dependency tracking.
One email a day. Unsubscribe in one click.
Keep up with Mobile platforms in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull latest Kotlin compiler if you've been debugging false unreachable code warnings in elvis operators JetBrains/kotlin [plan]
- → Audit any custom isClassType calls in your codebase; migrate to classId before the deprecation period ends JetBrains/kotlin [plan]
References
- [1] [CFG] Elvis exit nodes should not be marked as unreachable ↗ JetBrains/kotlin
- [2] [FIR] Move cross-enum-entry initialization checks to CFG ↗ JetBrains/kotlin
- [3] [Wasm] Convert blacklist for IC cache invalidation into the whitelist ↗ JetBrains/kotlin
- [4] [IR] Add `IrModuleFragment` link to `IrExternalPackageFragment` ↗ JetBrains/kotlin
- [5] KT-68881: Deprecate isClassType utility and introduce classId in KaType ↗ JetBrains/kotlin