blob: 1ce34ba362269bca9ce6bc97cf544c3be911a39b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
object TupledEvidenceTest {
abstract class TupledEvidence[M[_], T0] { type T = T0 }
implicit def witnessTuple2[M[_], T1, T2](implicit ev1: M[T1], ev2: M[T2]):
TupledEvidence[M, (T1, T2)] { type T = (T1, T2) } = sys.error("")
class GetResult[T]
implicit val getString: GetResult[String] = new GetResult[String]
implicit def getTuple[T](implicit w: TupledEvidence[GetResult, T]): GetResult[w.T] = sys.error("")
def f[T : GetResult] = ""
f[(String,String)](getTuple[(String, String)])
f[(String,String)]
}
|