Closed
Description
Compiler version
3.4.2
Minimized example
import scala.quoted.*
private def isUnionCanonicalImpl[U: Type](using Quotes): Expr[Unit] =
import quotes.reflect.*
val u = TypeRepr.of[U].dealiasKeepOpaques
def inner[U: Type](s: Set[TypeRepr], tr: TypeRepr): Set[TypeRepr] =
tr.dealiasKeepOpaques match
case OrType(a, b) =>
val ss = inner[U](s, a)
inner[U](ss, b)
case x if s.contains(x) =>
report.errorAndAbort(s"Type ${x.show} multiple times (CHECK ALIASES) in union ${u.show}")
case x => s + x
inner(Set.empty, u)
'{ () }
// build.sbt
scalacOptions ++= Seq(
"-source:future-migration"
)
https://scastie.scala-lang.org/wKXmWPdTT2u4crw5NBy3wQ
Output Error/Warning message
Couldn't find an easy way to get full text version of scatie warning
[warn] 59 | case OrType(a, b) =>
[warn] | ^^^^^^^^^^^^
[warn] | pattern selector should be an instance of Matchable,,
[warn] | but it has unmatchable type x$1.reflect.TypeRepr instead
Expected
no warning?