@@ -60,7 +60,7 @@ class ElimByName extends MiniPhase, InfoTransformer:
60
60
override def description : String = ElimByName .description
61
61
62
62
override def runsAfterGroupsOf : Set [String ] = Set (ExpandSAMs .name, ElimRepeated .name, RefChecks .name)
63
- // - ExpanSAMs applied to partial functions creates methods that need
63
+ // - ExpandSAMs applied to partial functions creates methods that need
64
64
// to be fully defined before converting. Test case is pos/i9391.scala.
65
65
// - ElimByName needs to run in a group after ElimRepeated since ElimRepeated
66
66
// works on simple arguments but not converted closures, and it sees the arguments
@@ -131,7 +131,6 @@ class ElimByName extends MiniPhase, InfoTransformer:
131
131
132
132
override def transformApply (tree : Apply )(using Context ): Tree =
133
133
trace(s " transforming ${tree.show} at phase ${ctx.phase}" , show = true ) {
134
-
135
134
def transformArg (arg : Tree , formal : Type ): Tree = formal match
136
135
case defn.ByNameFunction (formalResult) =>
137
136
def stripTyped (t : Tree ): Tree = t match
@@ -147,7 +146,8 @@ class ElimByName extends MiniPhase, InfoTransformer:
147
146
case _ =>
148
147
arg
149
148
150
- val mt @ MethodType (_) = tree.fun.tpe.widen: @ unchecked
149
+ val mt0 @ MethodType (_) = tree.fun.tpe.widen: @ unchecked
150
+ val mt @ MethodType (_) = transformInfo(mt0, tree.fun.symbol): @ unchecked
151
151
val args1 = tree.args.zipWithConserve(mt.paramInfos)(transformArg)
152
152
cpy.Apply (tree)(tree.fun, args1)
153
153
}
0 commit comments