Skip to content

Commit 65a1e80

Browse files
committed
Add comment
1 parent 4c8bd42 commit 65a1e80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/src/dotty/tools/dotc/transform/ElimByName.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class ElimByName extends MiniPhase, InfoTransformer:
103103
Closure(meth,
104104
_ => arg.changeOwnerAfter(ctx.owner, meth, thisPhase),
105105
targetType = defn.ByNameFunction(argType)
106+
// Note: this will forget any captures on the original by-name type
107+
// But that's not a problem since `targetType` is an inferred type, so
108+
// all capture sets will be erased on Setup.
106109
).withSpan(arg.span)
107110

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

0 commit comments

Comments
 (0)