summaryrefslogtreecommitdiff
path: root/test/files/run/t9806.scala
blob: ccde989efeb6b6b5f62ac9abe2839b6f9d0944c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
object Ex extends Exception
object Test {
  def main(args: Array[String]) {
    try foo catch { case Ex => }
  }

  def isTrue(b: Boolean) = b
  def foo = {
    var streamErrors1 = true
    try {
      streamErrors1 = false
      throw Ex
    } catch {
      case ex if streamErrors1 =>
        assert(isTrue(streamErrors1))
    }
  }
}