diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-05 13:51:44 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | 4dd8469391c440728fa8ee4e45d521b7933d5bd8 (patch) | |
tree | a64baa34b874596e621ca69b97bc580d0728eaf4 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | 29acee02f66c988cc9763057c785c98477201755 (diff) | |
download | dotty-4dd8469391c440728fa8ee4e45d521b7933d5bd8.tar.gz dotty-4dd8469391c440728fa8ee4e45d521b7933d5bd8.tar.bz2 dotty-4dd8469391c440728fa8ee4e45d521b7933d5bd8.zip |
Avoid reference to local bindings in Inlined nodes
To do this, use a proper TypeAssigner for Inlined, analogous to
how we type Blocks.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 3672996c8..8bc156606 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -948,8 +948,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit def typedInlined(tree: untpd.Inlined, pt: Type)(implicit ctx: Context): Inlined = { val (exprCtx, bindings1) = typedBlockStats(tree.bindings) val expansion1 = typed(tree.expansion, pt)(Inliner.inlineContext(tree.call)(exprCtx)) - cpy.Inlined(tree)(tree.call, bindings1.asInstanceOf[List[MemberDef]], expansion1) - .withType(expansion1.tpe) + assignType(cpy.Inlined(tree)(tree.call, bindings1.asInstanceOf[List[MemberDef]], expansion1), + bindings1, expansion1) } def typedTypeTree(tree: untpd.TypeTree, pt: Type)(implicit ctx: Context): TypeTree = track("typedTypeTree") { |