Skip to content

Commit b39f490

Browse files
Use isMatchAlias in TypeOps.simplify and Inlines.unrollTupleTypes
1 parent 562a431 commit b39f490

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ object TypeOps:
143143
defn.MatchCase(simplify(pat, theMap), body)
144144
case tp: AppliedType =>
145145
tp.tycon match
146-
case tycon: TypeRef if tycon.info.isInstanceOf[MatchAlias] =>
146+
case tycon: TypeRef if tp.isMatchAlias =>
147147
isFullyDefined(tp, ForceDegree.all)
148148
case _ =>
149149
val normed = tp.tryNormalize

compiler/src/dotty/tools/dotc/inlines/Inlines.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,15 @@ object Inlines:
445445
evidence
446446
}
447447

448-
def unrollTupleTypes(tpe: Type): Option[List[Type]] = tpe.dealias.normalized match
448+
def unrollTupleTypes(tpe: Type): Option[List[Type]] = tpe.dealias match
449449
case AppliedType(tycon, args) if defn.isTupleClass(tycon.typeSymbol) =>
450450
Some(args)
451451
case AppliedType(tycon, head :: tail :: Nil) if tycon.isRef(defn.PairClass) =>
452452
unrollTupleTypes(tail).map(head :: _)
453453
case tpe: TermRef if tpe.symbol == defn.EmptyTupleModule =>
454454
Some(Nil)
455+
case tpe: AppliedType if tpe.isMatchAlias =>
456+
unrollTupleTypes(tpe.tryNormalize)
455457
case _ =>
456458
None
457459

0 commit comments

Comments
 (0)