summaryrefslogtreecommitdiff
path: root/test/files/run/disable-assertions.scala
blob: 7ec4cfb495c90ecc439e2114539fc8d0e3d3eb73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
object Elided {
  import annotation._, elidable._
  @elidable(INFO) def info(): Boolean = true
  @elidable(10000) def f(): Boolean = true
  def g(): Boolean = { assert(false); true }
}

object Test extends App {
  import Elided._
  if (info()) println("Bad info.")
  if (!f()) println("Elided f.")
  if (!g()) println("Elided g?")   // assert should be off
}