summaryrefslogtreecommitdiff
path: root/test/files/run/inlineHandlers.scala
blob: 8c672a07b9bb3bce68b2d6c7ab73f8abb25411a1 (plain) (blame)
1
2
3
4
5
6
7
object Test {
  @noinline def ham: String = throw null
  @inline def inner: String = try { ham } catch { case _: NullPointerException => "npe" }
  def foo = try inner catch { case e: Throwable => throw e }

  def main(args: Array[String]): Unit = assert(foo == "npe")
}