dszopa
07/23/2017, 5:09 AMif when is used as an expression, the else branch is mandatory unless the compiler can prove that all possible cases are covered with branch conditions
I believe the reason that you're getting no complaints about the when not being exhaustive is because the when statement is not returning anything. Because of this it is treated as a statement and does not need to be exhaustive.