@@ -250,7 +250,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
250
250
* @param bindingsBuf the buffer to which the definition should be appended
251
251
*/
252
252
private def paramBindingDef (name : Name , paramtp : Type , arg : Tree ,
253
- bindingsBuf : mutable.ListBuffer [ValOrDefDef ]): ValOrDefDef = {
253
+ bindingsBuf : mutable.ListBuffer [ValOrDefDef ])( implicit ctx : Context ) : ValOrDefDef = {
254
254
val argtpe = arg.tpe.dealiasKeepAnnots
255
255
val isByName = paramtp.dealias.isInstanceOf [ExprType ]
256
256
var inlineFlag = InlineProxy
@@ -694,15 +694,15 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
694
694
val argSyms = (mt.paramNames, mt.paramInfos, args).zipped.map { (name, paramtp, arg) =>
695
695
arg.tpe.dealias match {
696
696
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
698
698
}
699
699
}
700
700
val expander = new TreeTypeMap (
701
701
oldOwners = ddef.symbol :: Nil ,
702
702
newOwners = ctx.owner :: Nil ,
703
703
substFrom = ddef.vparamss.head.map(_.symbol),
704
704
substTo = argSyms)
705
- seq( bindingsBuf.toList, expander.transform(ddef.rhs))
705
+ Inlined (ddef, bindingsBuf.toList, expander.transform(ddef.rhs))
706
706
case _ => tree
707
707
}
708
708
case _ => tree
0 commit comments