summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorRoland <rk@rkuhn.info>2012-09-11 20:37:43 +0200
committerRoland <rk@rkuhn.info>2012-09-11 20:39:24 +0200
commit4a476e775fe7d3a126a42a5127c31e09b9117393 (patch)
treeaac9c496fa87b5e4b9b5c47b944895a9db0e6399 /src/library
parentccf734acb7a6d0ea21cd44e5f0fc378a6804825d (diff)
downloadscala-4a476e775fe7d3a126a42a5127c31e09b9117393.tar.gz
scala-4a476e775fe7d3a126a42a5127c31e09b9117393.tar.bz2
scala-4a476e775fe7d3a126a42a5127c31e09b9117393.zip
two more minor cleanups to Duration
- copy partest TestUtil.intercept change from PR 1279 branch - add comment on non-obvious match cases
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/concurrent/util/Duration.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/concurrent/util/Duration.scala b/src/library/scala/concurrent/util/Duration.scala
index 6d44c93bc2..8fd47630cb 100644
--- a/src/library/scala/concurrent/util/Duration.scala
+++ b/src/library/scala/concurrent/util/Duration.scala
@@ -306,8 +306,8 @@ object Duration {
val Inf: Infinite = new Infinite {
override def toString = "Duration.Inf"
def compare(other: Duration) = other match {
- case x if x eq Undefined => -1
- case x if x eq this => 0
+ case x if x eq Undefined => -1 // Undefined != Undefined
+ case x if x eq this => 0 // `case Inf` will include null checks in the byte code
case _ => 1
}
def unary_- : Duration = MinusInf