We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca468b3 commit 26ff039Copy full SHA for 26ff039
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -631,6 +631,7 @@ 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 List(child) // Tuple is weird/different...
635
else if (child.is(Private) || child.is(Sealed)) && child.isOneOf(AbstractOrTrait) then getChildren(child)
636
else List(child)
637
}
0 commit comments