On Thu, Jul 9, 2009 at 1:30 PM, Alan Wood<
wood@...> wrote:
> I'm confused about Unit. It seems that any type conforms to it even though
> it's populated by a single value? ...
<snip/>
> scala> u = a
> u: Unit = ()
Predef defines an implicit conversion from Any to Unit, primarily to
allow the discarding of values of blocks with Unit as their expected
type. Convertibility via an implicit isn't quite the same as a subtype
relationship however ...
Cheers,
Miles
--
Miles Sabin
tel: +44 (0)7813 944 528
skype: milessabin
http://www.chuusai.com/http://twitter.com/milessabin