Replacement of Unit
.
Replacement of Unit
.
Scala automatically converts non-Unit
values into Unit
,
making it impossible to detect when users are actually
returning Unit
or not in their tests.
Void
on the other hand boxes any such value, such
that we can detect it in tests and deliver a meaningful
error.