[scala] Confusion about Unit
I'm confused about Unit. It seems that any type conforms to it even though it's populated by a single value? ...
scala> var a : Int = 24
a: Int = 24
scala> var u : Unit = ()
u: Unit = ()
scala> a = u
<console>:6: error: type mismatch;
found : Unit
required: Int
a = u
^
scala> u = a
u: Unit = ()
----
Alan