summaryrefslogtreecommitdiff
path: root/test/files/run/caseclasses.scala
blob: 18455768cebe8046038b1f958b5cefe4f5d4f30b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
case class Foo(x: int)(y: int);

case class Bar;

object Test extends Application {
  def fn[a,b](x: a => b) = x;
  val f = fn(Foo(1))
  (f(2): AnyRef) match {
    case Foo(1) => System.out.println("OK")
    case Bar() => System.out.println("NO")
  }
}