compared with
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (9)

View Page History

Every number type supports the following conversions:
* {{byte : Byte}}
* {{short : Short}}
* {{int : Int}}
* {{long : Long}}
* {{float : Float}}
* {{double : Double}}
* {{char : Char}}

Absence of implicit conversions is rarely noticeable because one can use literals almost freely cause the type is inferred from the context, and arithmetical operations are _overloaded_ for appropriate conversions, for example
val l = 1.long + 3 // Long + Int => Long

There're no "L"-tagged or otherwise tagged literals. In case of ambiguity, one should use explicit conversions to specify a type for a literal:
val list = list(1.lng, 100000000000, 2.lng)
val list = list(1.long, 100000000000, 2.long)