@@ -69,7 +69,7 @@ object Inliner {
69
69
override def transform (t : Tree )(implicit ctx : Context ) = {
70
70
t match {
71
71
case Inlined (t, Nil , expr) if t.isEmpty => expr
72
- case _ => super .transform(t.withSourcePos (call.sourcePos ))
72
+ case _ => super .transform(t.withPosOf (call))
73
73
}
74
74
}
75
75
}
@@ -137,7 +137,7 @@ object Inliner {
137
137
case call :: _ if call.symbol.sourceFile != curSourceFile =>
138
138
// Until we implement JSR-45, we cannot represent in output positions in other source files.
139
139
// So, reposition inlined code from other files with the call position:
140
- transformed.withSourcePos(inlinedAtPos )
140
+ transformed.withPosOf(inlined.call )
141
141
case _ => transformed
142
142
}
143
143
}
@@ -419,7 +419,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
419
419
case Some (t) if tree.isTerm && t.isSingleton =>
420
420
singleton(t.dealias)
421
421
case Some (t) if tree.isType =>
422
- TypeTree (t).withSourcePos (tree.sourcePos )
422
+ TypeTree (t).withPosOf (tree)
423
423
case _ => tree
424
424
}
425
425
case tree => tree
@@ -430,7 +430,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
430
430
431
431
// Apply inliner to `rhsToInline`, split off any implicit bindings from result, and
432
432
// make them part of `bindingsBuf`. The expansion is then the tree that remains.
433
- val expansion = inliner.transform(rhsToInline).withSourcePos (call.sourcePos )
433
+ val expansion = inliner.transform(rhsToInline).withPosOf (call)
434
434
435
435
def issueError () = callValueArgss match {
436
436
case (msgArg :: rest) :: Nil =>
@@ -596,7 +596,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
596
596
case _ =>
597
597
binding
598
598
}
599
- binding1.withSourcePos (call.sourcePos )
599
+ binding1.withPosOf (call)
600
600
}
601
601
602
602
/** An extractor for references to inlineable arguments. These are :
@@ -1008,7 +1008,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
1008
1008
val t1 = t match {
1009
1009
case t : RefTree =>
1010
1010
if (t.name != nme.WILDCARD && boundTypes.contains(t.symbol))
1011
- TypeTree (dealiasedType).withSourcePos(t.sourcePos )
1011
+ TypeTree (dealiasedType).withPosOf(t )
1012
1012
else t.withType(dealiasedType)
1013
1013
case t : DefTree =>
1014
1014
t.symbol.info = dealias(t.symbol.info)
0 commit comments