Instead of doing it before the switch tower, do it afterwards, so that special handling may be done before undefined gets casted to the destination type. In this case the special handling we want to do is *[N]T to []T setting the slice length based on the array length, even when the array value is undefined.