summaryrefslogtreecommitdiff
path: root/test/files/run/t8601d.scala
blob: ac89963d67712e5e8b833582fb6bc061f04588ee (plain) (blame)
1
2
3
4
5
6
7
8
object Test {
  def monitor(x: AnyRef): Unit = {x.synchronized(()); ()}
  def check(x: => Any) = try { x; sys.error("failed to throw NPE") } catch { case _: NullPointerException => }

  def main(args: Array[String]) {
    check(monitor(null))
  }
}