Can someone please help me understand the error below and suggest a workaround? I am trying to extract the return type from F which is either Function0 or Function1
type Out[F] = F match
case Function0[b] => b
case Function1[a, b] => b
summon[Out[Int => String] =:= String] // does not compile with following error:
Cannot prove that Out[Int => String] =:= String.
Note: a match type could not be fully reduced:
trying to reduce Out[Int => String]
failed since selector Int => String
does not match case () => b => b
and cannot be shown to be disjoint from it either.
Therefore, reduction cannot advance to the remaining casecase a => b => bsummon[Out[Int => String] =:= String]