We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ae6ad4 commit 2e8ea24Copy full SHA for 2e8ea24
compiler/src/dotty/tools/dotc/ast/Desugar.scala
@@ -1098,9 +1098,9 @@ object desugar {
1098
val firstDef =
1099
ValDef(tmpName, TypeTree(), matchExpr)
1100
.withSpan(pat.span.union(rhs.span)).withMods(patMods)
1101
- val arity = vars.length
+ val useSelectors = vars.length <= 22
1102
def selector(n: Int) =
1103
- if arity <= 22 then Select(Ident(tmpName), nme.selectorName(n))
+ if useSelectors then Select(Ident(tmpName), nme.selectorName(n))
1104
else Apply(Select(Ident(tmpName), nme.apply), Literal(Constant(n)) :: Nil)
1105
val restDefs =
1106
for (((named, tpt), n) <- vars.zipWithIndex if named.name != nme.WILDCARD)
0 commit comments