We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc5a9a4 commit 45e971fCopy full SHA for 45e971f
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1553,7 +1553,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1553
case otherTpe => otherTpe.widen
1554
/** Extractor for match types hidden behind an AppliedType/MatchAlias */
1555
object MatchTypeInDisguise {
1556
- def unapply(tp: AppliedType)(using Context): Option[MatchType] = tp match {
+ def unapply(tp: Type)(using Context): Option[MatchType] = tp match {
1557
case AppliedType(tycon: TypeRef, args) =>
1558
tycon.info match {
1559
case MatchAlias(alias) =>
@@ -1563,6 +1563,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
1563
}
1564
case _ => None
1565
1566
+ case mt: MatchType => Some(mt)
1567
1568
1569
0 commit comments