blob: 30c4261a8178bd4b1e377802aef1a01a611af96a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
trait Fooable[T]
object Fooable {
implicit def conjure[T]: Fooable[T] = {
println("conjure")
new Fooable[T]{}
}
}
object Test {
implicit def traversable[T, Coll[_] <: Traversable[_]](implicit
elem: Fooable[T]): Fooable[Coll[T]] = {
println("traversable")
new Fooable[Coll[T]]{}
}
def main(args: Array[String]) {
implicitly[Fooable[List[Any]]]
}
}
|