summaryrefslogtreecommitdiff
path: root/tests/examplefiles/scala/pattern-matching.scala
blob: 54197c81d3bdc5ef469be2d226e8a0db8e0d20e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
def f(x: Int, y: Int) = x match {
    case `y` => 
    case  s @ Seq(_, _, _) => 
    case Seq(first, tail @ _*) =>
    case first +: tail =>
    case 3 | 5 | 6 =>
    case y: Number => y.n
    case Lit(n)        => n
    case IsZero(u)     => eval(u) == 0
    case _ => 15
}