diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-01 14:05:25 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-01 14:09:23 -0800 |
commit | 68218fa678abfce9cce9f764e3cb9463ce6e0b85 (patch) | |
tree | 7e05e3156b2f6fcb4c7cd326cdd1d89ef420aba5 /src/library | |
parent | 264ff5d5e8dbec4ae2e13bf52e66a965d884b25c (diff) | |
download | scala-68218fa678abfce9cce9f764e3cb9463ce6e0b85.tar.gz scala-68218fa678abfce9cce9f764e3cb9463ce6e0b85.tar.bz2 scala-68218fa678abfce9cce9f764e3cb9463ce6e0b85.zip |
Update RoundingMode.
Not to use the deprecated Enumeration constructor.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/math/BigDecimal.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/math/BigDecimal.scala b/src/library/scala/math/BigDecimal.scala index 497de92c80..c1f45eccfb 100644 --- a/src/library/scala/math/BigDecimal.scala +++ b/src/library/scala/math/BigDecimal.scala @@ -33,8 +33,10 @@ object BigDecimal { /** Cache ony for defaultMathContext using BigDecimals in a small range. */ private lazy val cache = new Array[BigDecimal](maxCached - minCached + 1) - object RoundingMode extends Enumeration(java.math.RoundingMode.values map (_.toString) : _*) with Serializable { + object RoundingMode extends Enumeration { type RoundingMode = Value + // These are supposed to be the same as java.math.RoundingMode.values, + // though it seems unwise to rely on the correspondence. val UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UNNECESSARY = Value } |