Skip to content

Commit 33e3fe7

Browse files
committed
Support Expr.FunctionBetaReduction for all arities
1 parent 33ad06b commit 33e3fe7

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
@@ -1232,7 +1232,7 @@ class Definitions {
12321232
}
12331233

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

0 commit comments

Comments
 (0)