summaryrefslogtreecommitdiff
path: root/test/files/run/backreferences.scala
blob: 335cd6c7dec65b72122b19ee307a3ac424e03344 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
case class Elem[T](x: T, y: T)

object Test {
  def unrolled[T](x: Any, y: Any, z: Any) = (x, y, z) match {
    case (el: Elem[_], el.x, el.y) => true
    case _                         => false
  }

  def main(args: Array[String]): Unit = {
    println(unrolled(Elem("bippy", 5), "bippy", 6))
    println(unrolled(Elem("bippy", 5), "bippy", 5))
  }
}