From d8c24cdfa978735b56b63b290e54f5e5450e5b3b Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Sun, 26 Oct 2025 13:12:48 +0100 Subject: [PATCH] Cleanup the type of UnApply trees in posttyper [Cherry-picked 170f1ffc91955615fb8005f59df3812711f88354] --- tests/pos/i24207.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/pos/i24207.scala 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