We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9df8b0b commit a56c5aeCopy full SHA for a56c5ae
compiler/src/dotty/tools/dotc/transform/ElimByName.scala
@@ -49,8 +49,10 @@ class ElimByName extends TransformByNameApply with InfoTransformer {
49
50
/** Map `tree` to `tree.apply()` is `ftree` was of ExprType and becomes now a function */
51
private def applyIfFunction(tree: Tree, ftree: Tree)(implicit ctx: Context) =
52
- if (isByNameRef(ftree))
53
- ctx.atPhase(next) { implicit ctx => tree.select(defn.Function0_apply).appliedToNone }
+ if (isByNameRef(ftree)) {
+ val tree0 = transformFollowing(tree)
54
+ ctx.atPhase(next) { implicit ctx => tree0.select(defn.Function0_apply).appliedToNone }
55
+ }
56
else tree
57
58
override def transformIdent(tree: Ident)(implicit ctx: Context): Tree =
0 commit comments