Skip to content

Commit

Permalink
Document why large generic tuples are not exhaustivity checked
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Dec 7, 2023
1 parent 5bafaac commit 771b866
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ object SpaceEngine {
val tpw = tp.widen.dealias
val classSym = tpw.classSymbol
classSym.is(Sealed) && !tpw.isLargeGenericTuple || // exclude large generic tuples from exhaustivity
// requires an unknown number of changes to make work
tpw.isInstanceOf[OrType] ||
(tpw.isInstanceOf[AndType] && {
val and = tpw.asInstanceOf[AndType]
Expand Down

0 comments on commit 771b866

Please sign in to comment.