Void

sealed abstract class Void

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.

Companion:
object
class Object
trait Matchable
class Any
class Caught[A]
object UnitRef.type