aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8601d.scala
blob: a6962847cb833ae421b4cef9e87305b329c80b02 (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]): Unit = {
    check(monitor(null))
  }
}