blob: 0d4717ccbb9abab9d75582d41873367a947ce9ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
class Foo[T] {
def toMap[K, V](implicit ev: Foo[T] <:< Foo[(K, V)]): Foo[Map[K, V]] = null
def toMap[K](keySelector: T => K): Foo[Map[K, T]] = null
}
object Foo {
(??? : Foo[Int]) toMap (_ % 2)
(??? : Foo[(Int, String)]).toMap
}
|