Skip to content

Commit cd68604

Browse files
committed
Use fixed copying instead of writing code out
1 parent 63146b4 commit cd68604

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,10 +1978,7 @@ object desugar {
19781978
val applyVParams = args.zipWithIndex.map {
19791979
case (p, n) => makeSyntheticParameter(n + 1, p)
19801980
}
1981-
tree match
1982-
case tree: FunctionWithMods =>
1983-
untpd.FunctionWithMods(applyVParams, result, tree.mods, tree.erasedParams)
1984-
case _ => untpd.Function(applyVParams, result)
1981+
cpy.Function(tree)(applyVParams, result).asInstanceOf[untpd.Function]
19851982
}
19861983
}
19871984

0 commit comments

Comments
 (0)