diff options
author | Roland <rk@rkuhn.info> | 2012-09-11 20:37:43 +0200 |
---|---|---|
committer | Roland <rk@rkuhn.info> | 2012-09-11 20:39:24 +0200 |
commit | 4a476e775fe7d3a126a42a5127c31e09b9117393 (patch) | |
tree | aac9c496fa87b5e4b9b5c47b944895a9db0e6399 /src/library | |
parent | ccf734acb7a6d0ea21cd44e5f0fc378a6804825d (diff) | |
download | scala-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.scala | 4 |
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 |