## Compiler version 3.1.1 ## Minimized code <!-- This code should be self contained, compilable (with possible failures) and as small as possible. Ideally, we should be able to just copy this code in a file and run `scalac` (and maybe `scala`) to reproduce the issue. --> Edit: since https://github.com/lampepfl/dotty/issues/14540#issuecomment-1049844123 I have adjusted to a repl example ```Scala scala> import scala.deriving.Mirror scala> enum Foo { case A } scala> assert(summon[Mirror.SumOf[Foo]] eq Foo) ``` ## Output fail at runtime: ```scala scala> assert(summon[Mirror.SumOf[Foo]] eq Foo) java.lang.AssertionError: assertion failed at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11) ... 36 elided ``` ## Expectation work, as in Scala 3.1.0