diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Predef.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 8881cd1fbe..d7bd88a88d 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -155,9 +155,9 @@ object Predef extends LowPriorityImplicits { final class Ensuring[A](val x: A) { def ensuring(cond: Boolean): A = { assert(cond); x } - def ensuring(cond: Boolean, msg: Any): A = { assert(cond, msg); x } + def ensuring(cond: Boolean, msg: => Any): A = { assert(cond, msg); x } def ensuring(cond: A => Boolean): A = { assert(cond(x)); x } - def ensuring(cond: A => Boolean, msg: Any): A = { assert(cond(x), msg); x } + def ensuring(cond: A => Boolean, msg: => Any): A = { assert(cond(x), msg); x } } implicit def any2Ensuring[A](x: A): Ensuring[A] = new Ensuring(x) |