blob: 3e09965ee8798fb20a6d1ad3c7e66c18f2579f51 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import scala.tools.partest.trace
import scala.util.control.Exception.allCatch
object Test extends App {
def intercept = allCatch.withApply(_.getClass)
val t: Boolean = true
trace(if (t) -0d else 0d)
trace(if (t) 0d else -0d)
trace(intercept(if (???) -0d else 0d))
trace(intercept(if (???) 0d else 0d))
trace(intercept(if (???) () else ()))
}
|