Skip to content

Commit 7d15704

Browse files
committed
Use children operation in Space
Now that we have defined in centrally, we can avoid the duplication in Space.
1 parent 7713860 commit 7d15704

File tree

1 file changed

+1
-6
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+1
-6
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
514514

515515
/** Decompose a type into subspaces -- assume the type can be decomposed */
516516
def decompose(tp: Type): List[Space] = {
517-
val children = tp.classSymbol.annotations.filter(_.symbol == ctx.definitions.ChildAnnot).map { annot =>
518-
// refer to definition of Annotation.makeChild
519-
annot.tree match {
520-
case Apply(TypeApply(_, List(tpTree)), _) => tpTree.symbol
521-
}
522-
}
517+
val children = tp.classSymbol.children
523518

524519
debug.println(s"candidates for ${tp.show} : [${children.map(_.show).mkString(", ")}]")
525520

0 commit comments

Comments
 (0)