aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/pos/contraImplicits.scala
blob: c4d6596158b30cac9bf94f4b7d81e4364c07c6f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import scala.reflect._
// this needs to be fleshed out further
class Contra[-T]

object Test {
  def getParam[T](c: Contra[T])(implicit ct: ClassTag[T]): Unit = {
    println(ct)
    ct
  }
  def f[T](x: Contra[T]): Contra[T] = x

  def main(args: Array[String]): Unit = {
    val x = f(new Contra[Int])
    val y: Contra[Int] = x
    getParam(new Contra[Int])
  }
}