Currently the hashing of case classes are delegated to scala.util.hashing.MurmurHash3.productHash.
This function takes into account the productPrefixonly when the productArity is 0.
This produces the following problem:
scala> Left(1).##
res1: Int = 818387364
scala> Right(1).##
res2: Int = 818387364
Should productPrefix always be mixed into the hashCode by using productPrefix.## as the seed?
Yes, that looks like a bug. Dotty-compiled case classes do take Product prefix into account.
scala> case class Left(x: Int)
defined class Left
scala> case class Right(x: Int)
defined class Right
scala> Left(1).##
val res3: Int = -1674650338
scala> Right(1).##
val res4: Int = 1333177388
scala>