File: t6541.scala

package info (click to toggle)
scala 2.11.12-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 62,776 kB
  • sloc: java: 13,415; xml: 3,252; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (25 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class A
class B[T](x: T)
case class C(a: A, b: B[_])

case class D(a: A, b: B[_]*)

case class E(c: Class[_])

object Test extends App {
  def f1(c: C) = c match {
    case C(a, b) => ()
  }

  def f2(d: D) = d match {
    case D(a, b1, b2) => ()
  }

  def f3(e: E) = e match {
    case E(c) => ()
  }

  f1(C(new A, new B(1)))
  f2(D(new A, new B(1), new B(2)))
  f3(E(classOf[E]))
}