blob: a03757b89c4729112344341369e3665f2a1a32be (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package instrumented
object MyPredef {
@inline
final def assert(assertion: Boolean, message: => Any) {
if (!assertion)
throw new java.lang.AssertionError("assertion failed: " + message)
}
}
class Foo(x: Int) {
MyPredef.assert(x > 0, "not positive: " + x)
}
|