Context-sensitive resolution in Kotlin 2.2
Write the same code with fewer qualifiers
Kotlin 2.2 makes the compiler even smarter by introducing context-sensitive resolution as an experimental feature. This improvement lets you use enum entries and similar “static” values, as well as types from sealed hierarchies without having to qualify them with the containing type, whenever that’s already obvious from the context.



