Skip to content

Commit ae1381a

Browse files
authored
Add reference to #24488 in MatchReducer's documentation
1 parent 04531c9 commit ae1381a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3594,7 +3594,11 @@ object MatchReducer:
35943594
case Stuck => "Stuck"
35953595
case NoInstance(fails) => "NoInstance(" ~ Text(fails.map(p.toText(_) ~ p.toText(_)), ", ") ~ ")"
35963596

3597-
/** A type comparer for reducing match types. */
3597+
/** A [[TypeComparer]] for reducing match types.
3598+
*
3599+
* This needs to be a [[TypeComparer]] because it mutates the `caseLambda`
3600+
* field defined in [[ConstraintHandling]]. See #24488 for more details.
3601+
*/
35983602
class MatchReducer(initctx: Context) extends TypeComparer(initctx) {
35993603
import MatchReducer.*
36003604

0 commit comments

Comments
 (0)