summaryrefslogblamecommitdiff
path: root/test/files/instrumented/inline-in-constructors/assert_1.scala
blob: a03757b89c4729112344341369e3665f2a1a32be (plain) (tree)
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)
}