From acab0fa000e89d91ef6a809cd1cb70d519d29d5a Mon Sep 17 00:00:00 2001 From: "Paolo G. Giarrusso" Date: Tue, 24 Jun 2014 05:18:20 +0200 Subject: [backport] SI-8677 Duration: Zero - Inf should be MinusInf Fixes #8677. Add basic tests. This is a backport from 2.12.x of dead39dc5f21c6eac41788e93426c50ddd398c24. --- src/library/scala/concurrent/duration/Duration.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/library') 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) = -- cgit v1.2.3