We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca468b3 commit 9e3f86aCopy full SHA for 9e3f86a
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -631,6 +631,8 @@ class SpaceEngine(using Context) extends SpaceLogic {
631
def getChildren(sym: Symbol): List[Symbol] =
632
sym.children.flatMap { child =>
633
if child eq sym then Nil // i3145: sealed trait Baz, val x = new Baz {}, Baz.children returns Baz...
634
+ else if tp.classSymbol == defn.TupleClass || tp.classSymbol == defn.NonEmptyTupleClass then
635
+ List(child) // TupleN and TupleXXL classes are used for Tuple, but they aren't Tuple's children
636
else if (child.is(Private) || child.is(Sealed)) && child.isOneOf(AbstractOrTrait) then getChildren(child)
637
else List(child)
638
}
0 commit comments