summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaolo G. Giarrusso <p.giarrusso@gmail.com>2014-06-24 05:18:20 +0200
committerPaolo G. Giarrusso <p.giarrusso@gmail.com>2014-07-04 11:45:42 +0200
commitacab0fa000e89d91ef6a809cd1cb70d519d29d5a (patch)
treed843a220e36128ab975faf112d569c8a8d0d69a0 /src
parent4dcb51c5a15aa5f2ddd27ae19453364706bc72ea (diff)
downloadscala-acab0fa000e89d91ef6a809cd1cb70d519d29d5a.tar.gz
scala-acab0fa000e89d91ef6a809cd1cb70d519d29d5a.tar.bz2
scala-acab0fa000e89d91ef6a809cd1cb70d519d29d5a.zip
[backport] SI-8677 Duration: Zero - Inf should be MinusInf
Fixes #8677. Add basic tests. This is a backport from 2.12.x of dead39dc5f21c6eac41788e93426c50ddd398c24.
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/concurrent/duration/Duration.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/concurrent/duration/Duration.scala b/src/library/scala/concurrent/duration/Duration.scala
index 1b50b7fa56..2eded9f060 100644
--- a/src/library/scala/concurrent/duration/Duration.scala
+++ b/src/library/scala/concurrent/duration/Duration.scala
@@ -621,7 +621,7 @@ final class FiniteDuration(val length: Long, val unit: TimeUnit) extends Duratio
}
def -(other: Duration) = other match {
case x: FiniteDuration => add(-x.length, x.unit)
- case _ => other
+ case _ => -other
}
def *(factor: Double) =