Skip to content

Commit

Permalink
Use fixed copying instead of writing code out
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Feb 29, 2024
1 parent 63146b4 commit cd68604
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/src/dotty/tools/dotc/ast/Desugar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1978,10 +1978,7 @@ object desugar {
val applyVParams = args.zipWithIndex.map {
case (p, n) => makeSyntheticParameter(n + 1, p)
}
tree match
case tree: FunctionWithMods =>
untpd.FunctionWithMods(applyVParams, result, tree.mods, tree.erasedParams)
case _ => untpd.Function(applyVParams, result)
cpy.Function(tree)(applyVParams, result).asInstanceOf[untpd.Function]
}
}

Expand Down

0 comments on commit cd68604

Please sign in to comment.