Skip to content

Commit 4b6b983

Browse files
committed
Inliner tweaks
Needed to make all pickling tests pass
1 parent 0747b49 commit 4b6b983

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,15 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
409409
tree.tpe match {
410410
case thistpe: ThisType =>
411411
thisProxy.get(thistpe.cls) match {
412-
case Some(t) => ref(t).withSourcePos(tree.sourcePos)
412+
case Some(t) => ref(t)
413413
case None => tree
414414
}
415415
case _ => tree
416416
}
417417
case tree: Ident =>
418418
paramProxy.get(tree.tpe) match {
419419
case Some(t) if tree.isTerm && t.isSingleton =>
420-
singleton(t.dealias).withSourcePos(tree.sourcePos)
420+
singleton(t.dealias)
421421
case Some(t) if tree.isType =>
422422
TypeTree(t).withSourcePos(tree.sourcePos)
423423
case _ => tree
@@ -430,7 +430,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
430430

431431
// Apply inliner to `rhsToInline`, split off any implicit bindings from result, and
432432
// 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).withSourcePos(call.sourcePos)
434434

435435
def issueError() = callValueArgss match {
436436
case (msgArg :: rest) :: Nil =>

0 commit comments

Comments
 (0)