aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t0508.scala
blob: 10fc0bfb461f2ff7353bf11e89ebc2a58814553e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
object Test extends dotty.runtime.LegacyApp {

  case class Foo(s: String, n: Int)

  def foo[A, B, C](unapply1: A => Option[(B, C)], v: A) = {
    unapply1(v) match {
      case Some((fst, snd)) => println("first: " + fst, " second: " + snd)
      case _ => println(":(")
    }
  }

  foo(Foo.unapply, Foo("this might be fun", 10))
}