Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
case redux =>
MatchResult.Reduced(redux.simplified)
case _ =>
MatchResult.Reduced(body)
MatchResult.Reduced(body.simplified)

if caseLambda.exists && matches(canWidenAbstract = false) then
redux(canApprox = true)
Expand Down
7 changes: 7 additions & 0 deletions tests/pos/i16596.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import scala.compiletime.ops.int

type Count[N,T] <: Tuple = (N,T) match
case (0,T) => EmptyTuple
case (N,T) => T *: Count[int.-[N, 1], T]

val a: Count[3, Int] = (1, 2, 3)