aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t6011b.scala
blob: 9d15bd664cfc5614b8ee57ca6ae55210106e4521 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
object Test extends App {
  var cond = true

  // should not generate a switch
  def f(ch: Char): Int = ch match {
    case 'a' if cond => 1
    case 'z' | 'a' => 2
  }

  println(f('a') + f('z')) // 3
}