From 5a46d19dde76b739f6672c9b6f57355cfd38159a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 15 Sep 2016 15:39:57 +0200 Subject: Handle inlining in inlining arguments We got unbound symbols before because a TreeTypeMap would copy a tree of an inline DefDef but would not adapt the inline body stored in the @inline annotation of the DefDef to point to the updated tree. --- src/dotty/tools/dotc/typer/Typer.scala | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Typer.scala') diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 4c7d1c50d..885bc56d6 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1359,10 +1359,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit case tree1: TypeTree => tree1 // no change owner necessary here ... case tree1: Ident => tree1 // ... or here case tree1 => - if (ctx.owner ne tree.owner) { - println(i"changing owner of $tree1 from ${tree.owner} to ${ctx.owner}") - tree1.changeOwner(tree.owner, ctx.owner) - } + if (ctx.owner ne tree.owner) tree1.changeOwner(tree.owner, ctx.owner) else tree1 } -- cgit v1.2.3