scala/scala — pull request #352 by nadezhin (2012-04-03 15:05:58+00:00)
Title: More fixes for ScalaNumericConversions.isValidXXX (related to SI-4540)

...to SI-4540).

Now there are 7 isValidXXX methods (for each primitive type).
2 of them are abstract (isValidLong and isValidDouble). Other have default imolementation.
However, BigInt, BigDecimal and all RichXXXX classes overrides them all for performance.
The full set of functions allows simplification of ScalaNumericConversions.unifiedPrimitiveEqual.

There are still doubts:
1) This change hurts users that have implemented subclasses of ScalaNumberConversions.
They will have to implement isValidLong and isValidDouble.
2) The specification of isValidDouble and isValidFloat on NaN arguments.
Now they return false, because NaN is a signal of invalid computations.
This may cause problems, though I don't see them now.