79fa2b6db0
Before this change, it could happen that `when` of type Unit has a branch whose type is not Unit. This can lead to problems in IR lowerings, for example PolymorphicSignatureLowering which is very reliant on the correct types of expressions and placement of coercions to Unit (KT-59218).