Skip to content

Commit 83b336e

Browse files
committed
Support Expr.FunctionBetaReduction for all arities
1 parent bec8fa0 commit 83b336e

File tree

2 files changed

+12
-271
lines changed

2 files changed

+12
-271
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ class Definitions {
12111211
}
12121212

12131213
def tupleTypes(tp: Type, bound: Int = Int.MaxValue)(implicit ctx: Context): Option[List[Type]] = {
1214-
@tailrec def rec(tp: Type, acc: List[Type], bound: Int): Option[List[Type]] = tp match {
1214+
@tailrec def rec(tp: Type, acc: List[Type], bound: Int): Option[List[Type]] = tp.normalized match {
12151215
case _ if bound < 0 => Some(acc.reverse)
12161216
case tp: AppliedType if defn.PairClass == tp.classSymbol => rec(tp.args(1), tp.args.head :: acc, bound - 1)
12171217
case tp: AppliedType if defn.isTupleClass(tp.tycon.classSymbol) => Some(acc.reverse ::: tp.args)

0 commit comments

Comments
 (0)