I have the following code in Scala3/Dotty that works as expected:
val tp10: (Int, Int, Int) = (1,2,3)
summon[tp6.type =:= tp6.type]
summon[(Int,Int,Int) =:= (Int,Int,Int)]
summon[(Int,Int,Int) <:< (Int,Int,Int)]
summon[tp10.type <:< (Int,Int,Int)]
But these cases fail:
val tp10: (Int, Int, Int) = (1,2,3)
summon[tp10.type =:= (Int,Int,Int)] // fail
summon[(Int,Int,Int) =:= tp10.type] // fail
summon[(Int,Int,Int) <:< tp10.type] // fail
I expect the equivalence testing to succeed. Am I correct? If not, why?
I am trying to get the following to work:
summon[Tuple.Map[tp6.type, NumericType] =:= tp6.type] // fail
which produces the error:
[error] 608 | summon[Tuple.Map[tp6.type, NumericType] =:= tp6.type] // fail
[error] | ^
[error] |Cannot prove that Int *: NumericType[Int] *:
[error] | scala.Tuple.Map[Int *: scala.Tuple$package.EmptyTuple.type, NumericType] =:= (tp6 : (Int, Int, Int)).
[error] one error found
Hence the use of .type
TIA