summaryrefslogblamecommitdiff
path: root/test/files/run/patmat-finally.scala
blob: 6f769b30a095248d0cb60653460c71ed4cb154ae (plain) (tree)
























                                                      
/** Test pattern matching and finally, see SI-5929. */
object Test extends App {
  def bar(s1: Object, s2: Object) {
    s1 match {
      case _ =>
    }

    try {
      ()
    } finally {
      s2 match {
        case _ =>
      }
    }
  }

  def x = {
    null match { case _ => }

    try { 1 } finally { while(false) { } }
  }

  bar(null, null)
  x  
}