diff --git a/tests/pos/i24207.scala b/tests/pos/i24207.scala new file mode 100644 index 000000000000..557b6f982f2b --- /dev/null +++ b/tests/pos/i24207.scala @@ -0,0 +1,12 @@ +class Generator: + private def generateTable(table: Table) = + val (ownRelations, _) = calculateOwnRelations(table) + ownRelations + + private def calculateOwnRelations(table: Table) = + val ownRelations = table.relations.filter(_.association.isDefined) + (ownRelations, Nil) + +case class Table(relations: Seq[TableRelation]) +case class TableRelation(association: Option[Association]) +trait Association