Closed
Description
Compiler version
3.4.0-RC3
(regressed since 3.3.1)
Minimized code
enum Op[A, B]:
case Dup[T]() extends Op[T, (T, T)]
def foo[R](f: [A, B] => (o: Op[A, B]) => R): R =
f(Op.Dup())
foo([A, B] => (o: Op[A, B]) => {
o match
case o: Op.Dup[t] =>
summon[A =:= t] // ERROR: Cannot prove that A =:= t.
summon[B =:= (t, t)] // ERROR: Cannot prove that B =:= (t, t).
42
})
https://scastie.scala-lang.org/PvLamiXMQXaEIWEf18kGXQ
Output
Cannot prove that A =:= t.
Cannot prove that B =:= (t, t).
Expectation
The code should compile. It does compile with Scala 3.3.1