Skip to content

Separate MatchReducer from TypeComparer? #24120

@mbovel

Description

@mbovel

There is a to-do on the MatchReducer written by @odersky:

/** A type comparer for reducing match types.
* TODO: Not sure this needs to be a type comparer. Can we make it a
* separate class?
*/
class MatchReducer(initctx: Context) extends TypeComparer(initctx) {

As warm-up tasks for #22587, could we:

  • Avoid making MatchReducer a subclass of TypeComparer? Maybe prefer composition over inheritance?
  • Move MatchReducer to its own file?
  • Improve the documentation of MatchReducer?

cc @Lluc24

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions