raulraja
12/07/2017, 5:34 PMCase to A instead of being a partial function from CaseSubtype to A. If your sole intent is to perform effects with no useful return the compiler can't guarantee exhaustiveness since no return may also be a noop or uncontemplated case. IMO The Unit singleton value should be used to make clear you have not forgotten to cover any of the cases. Functions that don't explicitly return are already returning Unit as value implicitly.