diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-15 15:39:57 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:12:28 +0200 |
commit | 5a46d19dde76b739f6672c9b6f57355cfd38159a (patch) | |
tree | 57dc454cad17be45e71e9180bb283c7cd606920e /src/dotty/tools/dotc/typer/Typer.scala | |
parent | c9fa504161cc34ec979ae3c1b73db6798adc4872 (diff) | |
download | dotty-5a46d19dde76b739f6672c9b6f57355cfd38159a.tar.gz dotty-5a46d19dde76b739f6672c9b6f57355cfd38159a.tar.bz2 dotty-5a46d19dde76b739f6672c9b6f57355cfd38159a.zip |
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.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 5 |
1 files changed, 1 insertions, 4 deletions
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 } |