From 2fe0f674124c5be064d1cbf80594fb8e7d5d78be Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 17 Oct 2016 15:48:59 +0200 Subject: Fix dropInlined to also change positions of subtrees --- src/dotty/tools/dotc/typer/Inliner.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/typer/Inliner.scala b/src/dotty/tools/dotc/typer/Inliner.scala index 55008c0c5..40c1ca350 100644 --- a/src/dotty/tools/dotc/typer/Inliner.scala +++ b/src/dotty/tools/dotc/typer/Inliner.scala @@ -244,8 +244,9 @@ object Inliner { /** Replace `Inlined` node by a block that contains its bindings and expansion */ def dropInlined(inlined: tpd.Inlined)(implicit ctx: Context): Tree = { val reposition = new TreeMap { - override def transform(tree: Tree)(implicit ctx: Context): Tree = - tree.withPos(inlined.call.pos) + override def transform(tree: Tree)(implicit ctx: Context): Tree = { + super.transform(tree).withPos(inlined.call.pos) + } } tpd.seq(inlined.bindings, reposition.transform(inlined.expansion)) } -- cgit v1.2.3