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 | |
parent | 264ff5d5e8dbec4ae2e13bf52e66a965d884b25c (diff) | |
download | scala-68218fa678abfce9cce9f764e3cb9463ce6e0b85.tar.gz scala-68218fa678abfce9cce9f764e3cb9463ce6e0b85.tar.bz2 scala-68218fa678abfce9cce9f764e3cb9463ce6e0b85.zip |
Update RoundingMode.
Not to use the deprecated Enumeration constructor.
-rw-r--r-- | src/compiler/scala/tools/nsc/io/Path.scala | 2 | ||||
-rw-r--r-- | src/library/scala/math/BigDecimal.scala | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/io/Path.scala b/src/compiler/scala/tools/nsc/io/Path.scala index 9efff089ba..a1b8e5e4d5 100644 --- a/src/compiler/scala/tools/nsc/io/Path.scala +++ b/src/compiler/scala/tools/nsc/io/Path.scala @@ -48,7 +48,7 @@ object Path { implicit def jfile2path(jfile: JFile): Path = apply(jfile) // java 7 style, we don't use it yet - // object AccessMode extends Enumeration("AccessMode") { + // object AccessMode extends Enumeration { // val EXECUTE, READ, WRITE = Value // } // def checkAccess(modes: AccessMode*): Boolean = { 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 } |