Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Nov 10, 2024
1 parent 4c8bd42 commit 65a1e80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/src/dotty/tools/dotc/transform/ElimByName.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class ElimByName extends MiniPhase, InfoTransformer:
Closure(meth,
_ => arg.changeOwnerAfter(ctx.owner, meth, thisPhase),
targetType = defn.ByNameFunction(argType)
// Note: this will forget any captures on the original by-name type
// But that's not a problem since `targetType` is an inferred type, so
// all capture sets will be erased on Setup.
).withSpan(arg.span)

private def isByNameRef(tree: Tree)(using Context): Boolean =
Expand Down

0 comments on commit 65a1e80

Please sign in to comment.