summaryrefslogtreecommitdiff
path: root/test/files/run/t8601b.scala
blob: 42b562af9670162c904fff271aebddda823be65f (plain) (blame)
1
2
3
4
5
6
7
8
9
object Test {
  def len(x: Array[String]): Unit = x.length

  def check(x: => Any) = try { x; sys.error("failed to throw NPE!") } catch { case _: NullPointerException => }

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