aboutsummaryrefslogblamecommitdiff
path: root/tests/patmat/t4526.scala
blob: d531c6b34304d83793a218664c6b95ab6d116f4f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                             
object Test{
  def foo(a: Int) = a match {
    case 5  => "Five!"
    case 42 => "The answer."
  }

  def bar(a: (Int, Int)) = a match {
    case (5, 5)  => "Two fives!"
    case (42, 21) => "The answer and a half."
  }

  def baz(a: (Boolean, Boolean)) = a match {
    case (true, false)  => "tf"
    case (false, true) =>  "ft"
  }
}