I use the above. An official way is coming soon. Check the KEEP for it.
d
dmitriy.novozhilov
07/26/2021, 7:11 AM
When with algebraic type (`Boolean`/sealed class/sealed interface/enum) in subject will be required to be exhaustive in Kotlin 1.7
In 1.6 such non exhaustive whens will be reported as warnings
You can enable it in 1.5.30 (when it will be released) with compiler flag