diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-05-15 18:35:59 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-05-15 18:35:59 +0000 |
commit | 25ac436d71517e4db1d31b93332d0ad9655435fa (patch) | |
tree | 06f131d533d258457f9d8d6b7cf52340c766782c | |
parent | d83897f0af73af4e69d925a2cca9002b0969a7b0 (diff) | |
download | scala-25ac436d71517e4db1d31b93332d0ad9655435fa.tar.gz scala-25ac436d71517e4db1d31b93332d0ad9655435fa.tar.bz2 scala-25ac436d71517e4db1d31b93332d0ad9655435fa.zip |
Fixed contribution #474 - BigInt.equals
-rw-r--r-- | src/library/scala/BigInt.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library/scala/BigInt.scala b/src/library/scala/BigInt.scala index bcdff55261..8aa10b44c4 100644 --- a/src/library/scala/BigInt.scala +++ b/src/library/scala/BigInt.scala @@ -123,6 +123,7 @@ class BigInt(val bigInteger: BigInteger) extends java.lang.Number { /** Compares this BigInt with the specified value for equality. */ override def equals (that: Any): boolean = that match { + case that: BigInt => this equals that case that: java.lang.Double => this.bigInteger.doubleValue == that.doubleValue case that: java.lang.Float => this.bigInteger.floatValue == that.floatValue case that: java.lang.Number => this equals BigInt(that.longValue) |