Skip to content

Commit 1e0c4e4

Browse files
committed
Delete TODO on MatchReducer
The suggested refactoring to composition over inheritance was blocked because MatchReducer requires modifying the mutable protected state (caseLambda) of its superclass, TypeComparer, before invoking dependent inherited methods.
1 parent b2cf503 commit 1e0c4e4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ object MatchReducer:
4545
case Stuck => "Stuck"
4646
case NoInstance(fails) => "NoInstance(" ~ Text(fails.map(p.toText(_) ~ p.toText(_)), ", ") ~ ")"
4747

48-
/** A type comparer for reducing match types.
49-
* TODO: Not sure this needs to be a type comparer. Can we make it a
50-
* separate class?
51-
*/
48+
/** A type comparer for reducing match types. */
5249
class MatchReducer(initctx: Context) extends TypeComparer(initctx) {
5350
import MatchReducer.*
5451

0 commit comments

Comments
 (0)