@@ -250,7 +250,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
250250 * @param bindingsBuf the buffer to which the definition should be appended
251251 */
252252 private def paramBindingDef (name : Name , paramtp : Type , arg : Tree ,
253- bindingsBuf : mutable.ListBuffer [ValOrDefDef ]): ValOrDefDef = {
253+ bindingsBuf : mutable.ListBuffer [ValOrDefDef ])( implicit ctx : Context ) : ValOrDefDef = {
254254 val argtpe = arg.tpe.dealiasKeepAnnots
255255 val isByName = paramtp.dealias.isInstanceOf [ExprType ]
256256 var inlineFlag = InlineProxy
@@ -694,15 +694,15 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
694694 val argSyms = (mt.paramNames, mt.paramInfos, args).zipped.map { (name, paramtp, arg) =>
695695 arg.tpe.dealias match {
696696 case ref @ TermRef (NoPrefix , _) => ref.symbol
697- case _ => paramBindingDef(name, paramtp, arg, bindingsBuf).symbol
697+ case _ => paramBindingDef(name, paramtp, arg, bindingsBuf)(ctx.withSource(cl.source)) .symbol
698698 }
699699 }
700700 val expander = new TreeTypeMap (
701701 oldOwners = ddef.symbol :: Nil ,
702702 newOwners = ctx.owner :: Nil ,
703703 substFrom = ddef.vparamss.head.map(_.symbol),
704704 substTo = argSyms)
705- seq( bindingsBuf.toList, expander.transform(ddef.rhs))
705+ Inlined (ddef, bindingsBuf.toList, expander.transform(ddef.rhs))
706706 case _ => tree
707707 }
708708 case _ => tree
0 commit comments